diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java index 4d29c190884..23078ba5eb3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java @@ -2062,6 +2062,9 @@ void onPaint(Event event) { } GC gc = event.gc; + if (gc == null) { + return; + } Font gcFont = gc.getFont(); Color gcBackground = gc.getBackground(); Color gcForeground = gc.getForeground();