From: Richard M. Stallman Date: Sun, 26 Nov 1995 20:50:52 +0000 (+0000) Subject: (set_frame_menubar): When called with deep_p == 0, X-Git-Tag: emacs-19.34~2206 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=62555c22ca24836f41a0973236cfd0f83b4d5532;p=emacs.git (set_frame_menubar): When called with deep_p == 0, that invalidates the previous f->menu_bar_vector. --- diff --git a/src/xmenu.c b/src/xmenu.c index 8fd87175a14..95aa47bccaa 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1654,7 +1654,7 @@ set_frame_menubar (f, first_time, deep_p) if (menu_items_used == i || (previous_items[i] != XVECTOR (menu_items)->contents[i])) break; - if (i == menu_items_used && i == previous_menu_items_used) + if (i == menu_items_used && i == previous_menu_items_used && i != 0) { free_menubar_widget_value_tree (first_wv); menu_items = Qnil; @@ -1704,6 +1704,11 @@ set_frame_menubar (f, first_time, deep_p) first_wv->contents = wv; prev_wv = wv; } + + /* Forget what we thought we knew about what is in the + detailed contents of the menu bar menus. + Changing the top level always destroys the contents. */ + f->menu_bar_items_used = 0; } /* Create or update the menu bar widget. */