# HG changeset patch # User Jan Dj¸«£rv # Date 1054661921 0 # Node ID 6db55492aca9e1fda13f02f0da5d4824e6d7b796 # Parent 5fc6a7035dd32f23252263fc00a4417baf183323 * gtkutil.c (make_menu_item): Make sure we don't crash on a NULL menu item label. diff -r 5fc6a7035dd3 -r 6db55492aca9 src/ChangeLog --- a/src/ChangeLog Tue Jun 03 13:30:08 2003 +0000 +++ b/src/ChangeLog Tue Jun 03 17:38:41 2003 +0000 @@ -1,3 +1,8 @@ +2003-06-03 Jan Dj,Ad(Brv + + * gtkutil.c (make_menu_item): Make sure we don't crash on a NULL + menu item label. + 2003-06-03 Richard M. Stallman * window.c (Fwindow_edges): Doc fix. diff -r 5fc6a7035dd3 -r 6db55492aca9 src/gtkutil.c --- 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);