Mercurial > emacs
diff src/gtkutil.c @ 51432:6db55492aca9
* gtkutil.c (make_menu_item): Make sure we don't crash on a NULL
menu item label.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Tue, 03 Jun 2003 17:38:41 +0000 |
parents | 8f1bed1dee3c |
children | e7bd8581e306 |
line wrap: on
line diff
--- a/src/gtkutil.c Tue Jun 03 13:30:08 2003 +0000 +++ b/src/gtkutil.c Tue Jun 03 17:38:41 2003 +0000 @@ -1249,6 +1249,12 @@ 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);