Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-03-22 13:03:15 +0000
committerBogdan Gheorghe2012-04-26 21:00:11 +0000
commitbee941fb91191b20eabec31b203fdc7c3bfb887f (patch)
treeb97ddefc1a01f4b4b551a3c7285185e47ee8734e
parent4171be6f67f46f1e929fa0a3983cfd3767530819 (diff)
downloadeclipse.platform.ui-bee941fb91191b20eabec31b203fdc7c3bfb887f.tar.gz
eclipse.platform.ui-bee941fb91191b20eabec31b203fdc7c3bfb887f.tar.xz
eclipse.platform.ui-bee941fb91191b20eabec31b203fdc7c3bfb887f.zip
Fix crash when the widget doesn't have a child.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
index 3d71e875539..d190f5f2775 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
@@ -940,7 +940,10 @@ void setFontDescription (int /*long*/ font) {
}
void setForegroundColor (GdkColor color) {
- setForegroundColor (OS.gtk_bin_get_child(handle), color);
+ int /*long*/ childHandle = OS.gtk_bin_get_child(handle);
+ if (childHandle != 0) {
+ setForegroundColor (childHandle, color);
+ }
}
/**

Back to the top