inspection view: npe in preview editor while folding append EA-89543

This commit is contained in:
Dmitry Batkovich
2016-10-11 10:16:09 +03:00
parent 23ed6a22fc
commit 80c888528e
@@ -127,6 +127,7 @@ public class ProblemPreviewEditorPresentation {
}
private boolean appendFoldings(Segment toShowRange) {
if (toShowRange == null) return false;
boolean isUpdated = false;
final int startLine = Math.max(0, myDocument.getLineNumber(toShowRange.getStartOffset()) - 1);
final int endLine = Math.min(myDocument.getLineCount(), myDocument.getLineNumber(toShowRange.getEndOffset()) + 2);