# HG changeset patch
# User Richard M. Stallman <rms@gnu.org>
# Date 861929088 0
# Node ID 0a75fcee3cb8838061eb3cbf35c0530a96a23bc1
# Parent  1dc9754cbf8e299bb5af49fccdeb84138ae6229f
(set_frame_menubar): When widget is new, forget records of old contents.

diff -r 1dc9754cbf8e -r 0a75fcee3cb8 src/xmenu.c
--- a/src/xmenu.c	Thu Apr 24 22:54:27 1997 +0000
+++ b/src/xmenu.c	Fri Apr 25 00:44:48 1997 +0000
@@ -1669,6 +1669,11 @@
 	= (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