From b4f395ccbfe55e5a37e973eee0ff7f372c551b50 Mon Sep 17 00:00:00 2001 From: Andrey Loskutov Date: Wed, 14 Feb 2024 10:14:05 +0100 Subject: [PATCH] NPE in SemanticHighlightingReconciler Fixes https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/1189 --- .../internal/ui/javaeditor/SemanticHighlightingReconciler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java index a92a05d8be8..72880716f8b 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java @@ -512,7 +512,7 @@ private void updatePresentation(TextPresentation textPresentation, List { // check Editor not reused otherwise meanwhile - if (document == fSourceViewer.getDocument()) { + if (fSourceViewer != null && document == fSourceViewer.getDocument()) { runnable.run(); } });