diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/SmartStepIntoActionHandler.java b/java/debugger/impl/src/com/intellij/debugger/actions/SmartStepIntoActionHandler.java index d656c0712124..3786d50a9f8c 100644 --- a/java/debugger/impl/src/com/intellij/debugger/actions/SmartStepIntoActionHandler.java +++ b/java/debugger/impl/src/com/intellij/debugger/actions/SmartStepIntoActionHandler.java @@ -97,7 +97,9 @@ public class SmartStepIntoActionHandler extends DebuggerActionHandler { } final Document doc = FileDocumentManager.getInstance().getDocument(vFile); - + if (line >= doc.getLineCount()) { + return Collections.emptyList(); // the document has been changed + } final int startOffset = doc.getLineStartOffset(line); final TextRange lineRange = new TextRange(startOffset, doc.getLineEndOffset(line)); final int offset = CharArrayUtil.shiftForward(doc.getCharsSequence(), startOffset, " \t");