diff options
author | Alexander Kurtakov | 2012-03-22 13:03:15 +0000 |
---|---|---|
committer | Bogdan Gheorghe | 2012-04-26 21:00:11 +0000 |
commit | bee941fb91191b20eabec31b203fdc7c3bfb887f (patch) | |
tree | b97ddefc1a01f4b4b551a3c7285185e47ee8734e | |
parent | 4171be6f67f46f1e929fa0a3983cfd3767530819 (diff) | |
download | eclipse.platform.swt-bee941fb91191b20eabec31b203fdc7c3bfb887f.tar.gz eclipse.platform.swt-bee941fb91191b20eabec31b203fdc7c3bfb887f.tar.xz eclipse.platform.swt-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.java | 5 |
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 3d71e87553..d190f5f277 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); + } } /** |