diff --git a/core/src/main/java/org/teavm/debugging/information/LayerIterator.java b/core/src/main/java/org/teavm/debugging/information/LayerIterator.java index ee8e5ae59..0f091e048 100644 --- a/core/src/main/java/org/teavm/debugging/information/LayerIterator.java +++ b/core/src/main/java/org/teavm/debugging/information/LayerIterator.java @@ -26,7 +26,9 @@ class LayerIterator { methodIterators[i] = new MethodIterator(debugInformation.layers[i]); } - nextImpl(); + if (!isEndReached()) { + nextImpl(); + } } public boolean isEndReached() {