Skip to content

Commit

Permalink
NPE in StickyScrollControl.getStickyLineStyleRanges #1964
Browse files Browse the repository at this point in the history
When the sticky lines are styled, the linked text widget could already be disposed or null. In this case, the sticky lines must not be styled.

Fixes #1964
  • Loading branch information
Christopher-Hermann authored and BeckerWdf committed Jun 15, 2024
1 parent ea02800 commit 8af8b3f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ private String fillLineNumberWithLeadingSpaces(int lineNumber) {

private void styleStickyLines() {
StyledText textWidget= sourceViewer.getTextWidget();
if (textWidget == null || textWidget.isDisposed()) {
return;
}

List<StyleRange> stickyLinesStyleRanges= new ArrayList<>();
int stickyLineTextOffset= 0;
Expand Down

0 comments on commit 8af8b3f

Please sign in to comment.