Fix EA-135863: Access allLineLocations() safely

This commit is contained in:
Yan Zhulanow
2019-02-21 00:52:19 +03:00
parent b54f9a0c05
commit bab1c63126
@@ -339,7 +339,11 @@ fun getStepOverAction(
val project = sourceFile.project
val methodLocations = location.method().allLineLocations()
val methodLocations = location.method().safeAllLineLocations()
if (methodLocations.isEmpty()) {
return Action.STEP_OVER()
}
val locationsLineAndFile = methodLocations.keysToMap { ktLocationInfo(it, isDexDebug, project, true) }
fun Location.ktLineNumber(): Int = (locationsLineAndFile[this] ?: ktLocationInfo(this, isDexDebug, project, true)).first