From 25b64b198c3212c1b3d741e1e00ae4a11a47cded Mon Sep 17 00:00:00 2001 From: Natalia Ukhorskaya Date: Thu, 21 Jan 2016 12:20:44 +0300 Subject: [PATCH] Minor: fix NPE --- idea/src/org/jetbrains/kotlin/idea/ExtraSteppingFilter.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/ExtraSteppingFilter.kt b/idea/src/org/jetbrains/kotlin/idea/ExtraSteppingFilter.kt index 1b6a4000807..aa00855b08f 100644 --- a/idea/src/org/jetbrains/kotlin/idea/ExtraSteppingFilter.kt +++ b/idea/src/org/jetbrains/kotlin/idea/ExtraSteppingFilter.kt @@ -31,9 +31,9 @@ class ExtraSteppingFilter : com.intellij.debugger.engine.ExtraSteppingFilter { return false; } - val debugProcess = context.debugProcess - val positionManager = KotlinPositionManager(debugProcess!!) - val location = context.frameProxy!!.location() + val debugProcess = context.debugProcess ?: return false + val positionManager = KotlinPositionManager(debugProcess) + val location = context.frameProxy?.location() ?: return false return runReadAction { shouldFilter(positionManager, location) } @@ -41,7 +41,7 @@ class ExtraSteppingFilter : com.intellij.debugger.engine.ExtraSteppingFilter { private fun shouldFilter(positionManager: KotlinPositionManager, location: Location): Boolean { - val defaultStrata = location.declaringType().defaultStratum() + val defaultStrata = location.declaringType()?.defaultStratum() if ("Kotlin" != defaultStrata) { return false; }