Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2016-04-05 16:39:11 +0000
committerMarkus Keller2016-04-05 16:39:11 +0000
commit534ed490b51e7b64f0afdbd1595dc7098177d066 (patch)
treef4b56b29f65be0a62adf2c1f55afd7467bad70b3
parent22828e122f47c8dcb38eea08603c0d10dd1e7240 (diff)
downloadeclipse.platform.swt-534ed490b51e7b64f0afdbd1595dc7098177d066.tar.gz
eclipse.platform.swt-534ed490b51e7b64f0afdbd1595dc7098177d066.tar.xz
eclipse.platform.swt-534ed490b51e7b64f0afdbd1595dc7098177d066.zip
Bug 419729: [Ubuntu] Native crash in OS._gtk_widget_show when creating RADIO MenuItem with UBUNTU_MENUPROXY
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
index 62b98337c6..69ba30c497 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
@@ -261,6 +261,14 @@ void createHandle (int index) {
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
break;
case SWT.RADIO:
+ if (OS.GTK_VERSION <= OS.VERSION (3, 10, 8)) {
+ /*
+ * Bug in Ubuntu <= 14.04 with UBUNTU_MENUPROXY. GTK crashes when
+ * label of radio button is empty, see https://bugs.eclipse.org/419729 .
+ * The workaround is to initialize the label with a space.
+ */
+ buffer = new byte [] { ' ', 0 };
+ }
/*
* Feature in GTK. In GTK, radio button must always be part of
* a radio button group. In a GTK radio group, one button is always

Back to the top