File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -8290,8 +8290,10 @@ public void setBackground(Color color) {
82908290 customBackground = color != null && !this .insideSetEnableCall && !backgroundDisabled ;
82918291 background = color ;
82928292 super .setBackground (color );
8293- resetCache (0 , content .getLineCount ());
8294- setCaretLocations ();
8293+ if (content != null ) {
8294+ resetCache (0 , content .getLineCount ());
8295+ setCaretLocations ();
8296+ }
82958297 super .redraw ();
82968298}
82978299/**
@@ -8885,8 +8887,10 @@ public void setForeground(Color color) {
88858887 customForeground = color != null && !this .insideSetEnableCall && !foregroundDisabled ;
88868888 foreground = color ;
88878889 super .setForeground (color );
8888- resetCache (0 , content .getLineCount ());
8889- setCaretLocations ();
8890+ if (content != null ) {
8891+ resetCache (0 , content .getLineCount ());
8892+ setCaretLocations ();
8893+ }
88908894 super .redraw ();
88918895}
88928896/**
You can’t perform that action at this time.
0 commit comments