From: Jason Rumney Date: Mon, 9 Jun 2008 21:43:49 +0000 (+0000) Subject: (Fx_popup_menu): Unwind protect while building menu. X-Git-Tag: emacs-pretest-23.0.90~4963 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0c2258fc7c30bfb03a7be8a6fb896f5a695a7bd5;p=emacs.git (Fx_popup_menu): Unwind protect while building menu. --- diff --git a/src/ChangeLog b/src/ChangeLog index b0b036a821e..f5495f59220 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-06-09 Jason Rumney + + * w32menu.c (Fx_popup_menu): Unwind protect while building menu. + 2008-06-09 Jason Rumney Changes to w32 files related to the move of common menu code diff --git a/src/w32menu.c b/src/w32menu.c index a2d87abc67a..4bed9f6f8ef 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -188,6 +188,7 @@ cached information about equivalent key sequences. */) Lisp_Object x, y, window; int keymaps = 0; int for_click = 0; + int specpdl_count = SPECPDL_INDEX (); struct gcpro gcpro1; #ifdef HAVE_MENUS @@ -271,6 +272,8 @@ cached information about equivalent key sequences. */) Vmenu_updating_frame = Qnil; #endif /* HAVE_MENUS */ + record_unwind_protect (unuse_menu_items, Qnil); + title = Qnil; GCPRO1 (title); @@ -340,6 +343,8 @@ cached information about equivalent key sequences. */) keymaps = 0; } + unbind_to (specpdl_count, Qnil); + if (NILP (position)) { discard_menu_items ();