diff --git a/bundles/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/stickyscroll/StickyScrollingControl.java b/bundles/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/stickyscroll/StickyScrollingControl.java index 85717c690e9..1e328fcae49 100644 --- a/bundles/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/stickyscroll/StickyScrollingControl.java +++ b/bundles/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/stickyscroll/StickyScrollingControl.java @@ -217,6 +217,9 @@ private String fillLineNumberWithLeadingSpaces(int lineNumber) { private void styleStickyLines() { StyledText textWidget= sourceViewer.getTextWidget(); + if (textWidget == null || textWidget.isDisposed()) { + return; + } List stickyLinesStyleRanges= new ArrayList<>(); int stickyLineTextOffset= 0;