Skip to content

Commit 28c2d5d

Browse files
tobias-melcherBeckerWdf
authored andcommitted
fix null pointer exception in SourceViewerDecorationSupport
fInlineAnnotationColorKey might be not set
1 parent abffd92 commit 28c2d5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ protected AnnotationPainter createAnnotationPainter() {
890890
painter.addTextStyleStrategy(AnnotationPreference.STYLE_UNDERLINE, fgUnderlineStrategy);
891891

892892
ColorRegistry registry = JFaceResources.getColorRegistry();
893-
if (registry != null) {
893+
if (registry != null && fInlineAnnotationColorKey != null) {
894894
Color color = registry.get(fInlineAnnotationColorKey);
895895
painter.setInlineAnnotationColor(color);
896896
if (fPropertyChangeListener != null) {

0 commit comments

Comments
 (0)