Commit ec867797 authored by Jan Djärv's avatar Jan Djärv

Don't call ENCODE_MENU_STRING on top level menu names, GC may occur.

parent 2bf436c3
......@@ -4,8 +4,7 @@
instead of name and key.
(update_submenu_strings): New function.
(set_frame_menubar): Remove call to inhibit_garbage_collection,
call update_submenu_strings. Call ENCODE_MENU_STRING for top level
menu names.
call update_submenu_strings.
* gtkutil.h (_widget_value): Added lname and lkey.
......
......@@ -2056,7 +2056,7 @@ set_frame_menubar (f, first_time, deep_p)
string = XVECTOR (items)->contents[i + 1];
if (NILP (string))
break;
wv->name = (char *) SDATA (ENCODE_MENU_STRING (string));
wv->name = (char *) SDATA (string);
update_submenu_strings (wv->contents);
wv = wv->next;
}
......@@ -2088,7 +2088,7 @@ set_frame_menubar (f, first_time, deep_p)
break;
wv = xmalloc_widget_value ();
wv->name = (char *) SDATA (ENCODE_MENU_STRING (string));
wv->name = (char *) SDATA (string);
wv->value = 0;
wv->enabled = 1;
wv->button_type = BUTTON_TYPE_NONE;
......
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