From 6986fb7e064e5f1d52ec595517862283912cce5f Mon Sep 17 00:00:00 2001 From: Tobias Melcher Date: Thu, 17 Oct 2024 13:47:04 +0200 Subject: [PATCH] fix null pointer exception in SourceViewerDecorationSupport fInlineAnnotationColorKey might be not set --- .../eclipse/ui/texteditor/SourceViewerDecorationSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java b/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java index d55b8998127..29e64653200 100644 --- a/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java +++ b/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java @@ -890,7 +890,7 @@ protected AnnotationPainter createAnnotationPainter() { painter.addTextStyleStrategy(AnnotationPreference.STYLE_UNDERLINE, fgUnderlineStrategy); ColorRegistry registry = JFaceResources.getColorRegistry(); - if (registry != null) { + if (registry != null && fInlineAnnotationColorKey != null) { Color color = registry.get(fInlineAnnotationColorKey); painter.setInlineAnnotationColor(color); if (fPropertyChangeListener != null) {