Skip to content

Commit 65108fd

Browse files
Fix EA-80854 - IOOBE: KotlinLineBreakpointType.getLambdaByOrdinal.
This could happen when breakpoint in lambda was set but than the code changed and there is no lambdas at this line anymore
1 parent d07cea5 commit 65108fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

idea/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinLineBreakpointType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private static JavaBreakpointProperties getProperties(@NotNull LineBreakpoint<?>
8888
private static KtFunction getLambdaByOrdinal(SourcePosition position, Integer ordinal) {
8989
if (ordinal != null && ordinal >= 0) {
9090
List<KtFunction> lambdas = BreakpointTypeUtilsKt.getLambdasAtLineIfAny(position);
91-
if (lambdas.size() >= ordinal) {
91+
if (!lambdas.isEmpty() && lambdas.size() >= ordinal) {
9292
return lambdas.get(ordinal);
9393
}
9494
}

0 commit comments

Comments
 (0)