]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fx_popup_menu): Unwind protect while building menu.
authorJason Rumney <jasonr@gnu.org>
Mon, 9 Jun 2008 21:43:49 +0000 (21:43 +0000)
committerJason Rumney <jasonr@gnu.org>
Mon, 9 Jun 2008 21:43:49 +0000 (21:43 +0000)
src/ChangeLog
src/w32menu.c

index b0b036a821e213eec913a5c64b15d1136dc84865..f5495f59220c9ceb249a42023363b6a2eef26203 100644 (file)
@@ -1,3 +1,7 @@
+2008-06-09  Jason Rumney  <jasonr@gnu.org>
+
+        * w32menu.c (Fx_popup_menu): Unwind protect while building menu.
+
 2008-06-09  Jason Rumney  <jasonr@gnu.org>
 
         Changes to w32 files related to the move of common menu code
index a2d87abc67a8e99480cf8d0a183d0368e899fcdc..4bed9f6f8ef4604bcfc61d4c3324a7eba808e7a6 100644 (file)
@@ -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 ();