]> git.eshelyaron.com Git - emacs.git/commitdiff
* gtkutil.c (make_menu_item): Make sure we don't crash on a NULL
authorJan Djärv <jan.h.d@swipnet.se>
Tue, 3 Jun 2003 17:38:41 +0000 (17:38 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Tue, 3 Jun 2003 17:38:41 +0000 (17:38 +0000)
  menu item label.

src/ChangeLog
src/gtkutil.c

index 9c4822ce1daf05d964a8faa3fc8e2c6a15528efd..8aec4824cc43060b21b99afd22288bb0f8d94254 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-03  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * gtkutil.c (make_menu_item): Make sure we don't crash on a NULL
+       menu item label.
+
 2003-06-03  Richard M. Stallman  <rms@gnu.org>
 
        * window.c (Fwindow_edges): Doc fix.
index 76d16c07695672d4ef42c06069479d3090fcb605..6ad7bc24246c3154537407268d9c067924103dae 100644 (file)
@@ -1249,6 +1249,12 @@ make_menu_item (utf8_label, utf8_key, item, group)
   GtkWidget *w;
   GtkWidget *wtoadd = 0;
 
+  /* It has been observed that some menu items have a NULL name field.
+     This will lead to this function being called with a NULL utf8_label.
+     GTK crashes on that so we set a blank label.  Why there is a NULL
+     name remains to be investigated.  */
+  if (! utf8_label) utf8_label = " ";
+
   if (utf8_key)
     wtoadd = make_widget_for_menu_item (utf8_label, utf8_key);