Commit adcb132c authored by Jan Djärv's avatar Jan Djärv
Browse files

* gtkutil.c (make_menu_item): Make sure we don't crash on a NULL

  menu item label.
parent fd6cfe11
2003-06-03 Jan Dj,Ad(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> 2003-06-03 Richard M. Stallman <rms@gnu.org>
* window.c (Fwindow_edges): Doc fix. * window.c (Fwindow_edges): Doc fix.
......
...@@ -1249,6 +1249,12 @@ make_menu_item (utf8_label, utf8_key, item, group) ...@@ -1249,6 +1249,12 @@ make_menu_item (utf8_label, utf8_key, item, group)
GtkWidget *w; GtkWidget *w;
GtkWidget *wtoadd = 0; 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) if (utf8_key)
wtoadd = make_widget_for_menu_item (utf8_label, utf8_key); wtoadd = make_widget_for_menu_item (utf8_label, utf8_key);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment