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
This commit is contained in:
Natalia Ukhorskaya
2016-04-13 14:30:05 +03:00
parent a929df6fa1
commit 7fb3099206
@@ -88,7 +88,7 @@ public class KotlinLineBreakpointType extends JavaLineBreakpointType {
private static KtFunction getLambdaByOrdinal(SourcePosition position, Integer ordinal) {
if (ordinal != null && ordinal >= 0) {
List<KtFunction> lambdas = BreakpointTypeUtilsKt.getLambdasAtLineIfAny(position);
if (lambdas.size() >= ordinal) {
if (lambdas.size() > ordinal) {
return lambdas.get(ordinal);
}
}