Don't call ENCODE_MENU_STRING on top level menu names, GC may occur.
This commit is contained in:
parent
2bf436c3bb
commit
ec86779779
2 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue