From b54f9a0c058267dfe83cc76606a19beeb6b1d32d Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Wed, 27 Feb 2019 23:13:54 +0300 Subject: [PATCH] Fix EA-105847, use 'location()' safely --- .../idea/debugger/stepping/KotlinSteppingCommandProvider.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt index 36a23bfce02..de327a73cbc 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt @@ -93,7 +93,7 @@ class KotlinSteppingCommandProvider : JvmSteppingCommandProvider() { } val file = sourcePosition.elementAt.containingFile - val location = suspendContext.debugProcess.invokeInManagerThread { suspendContext.frameProxy?.location() } ?: return null + val location = suspendContext.debugProcess.invokeInManagerThread { suspendContext.frameProxy?.safeLocation() } ?: return null if (isInSuspendMethod(location) && !isOnSuspendReturnOrReenter(location) && !isLastLineLocationInMethod(location)) { return DebugProcessImplHelper.createStepOverCommandWithCustomFilter( suspendContext, ignoreBreakpoints, KotlinSuspendCallStepOverFilter(sourcePosition.line, file, ignoreBreakpoints)