From 0b1cf3999de6c92171337e1803e42ec6f5d8db78 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 25 Apr 1997 00:44:48 +0000 Subject: [PATCH] (set_frame_menubar): When widget is new, forget records of old contents. --- src/xmenu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xmenu.c b/src/xmenu.c index a3b5d060a22..7ef1131769a 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1669,6 +1669,11 @@ set_frame_menubar (f, first_time, deep_p) = (Lisp_Object *) alloca (previous_menu_items_used * sizeof (Lisp_Object)); + /* If we are making a new widget, its contents are empty, + do always reinitialize them. */ + if (! menubar_widget) + previous_menu_items_used = 0; + buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer; specbind (Qinhibit_quit, Qt); /* Don't let the debugger step into this code -- 2.39.5