Fix crash from clicking on menu bar (bug#34762, bug#26982)

* src/nsmenu.m (ns_update_menubar): Remove extraneous use of
autorelease pool.
This commit is contained in:
Win Treese 2020-09-08 15:32:15 -04:00 committed by Alan Third
parent 60de60b350
commit 9c42f1f7f0

View file

@ -122,7 +122,6 @@
/*fprintf (stderr, "ns_update_menubar: frame: %p\tdeep: %d\tsub: %p\n", f, deep_p, submenu); */
block_input ();
pool = [[NSAutoreleasePool alloc] init];
/* Menu may have been created automatically; if so, discard it. */
if ([menu isKindOfClass: [EmacsMenu class]] == NO)
@ -240,7 +239,6 @@
[[submenu title] UTF8String]);
discard_menu_items ();
unbind_to (specpdl_count, Qnil);
[pool release];
unblock_input ();
return;
}
@ -298,7 +296,6 @@
free_menubar_widget_value_tree (first_wv);
discard_menu_items ();
unbind_to (specpdl_count, Qnil);
[pool release];
unblock_input ();
return;
}
@ -364,7 +361,6 @@
if (NILP (items))
{
free_menubar_widget_value_tree (first_wv);
[pool release];
unblock_input ();
return;
}
@ -395,7 +391,6 @@
if (i == n)
{
free_menubar_widget_value_tree (first_wv);
[pool release];
unblock_input ();
return;
}
@ -454,7 +449,6 @@
if (needsSet)
[NSApp setMainMenu: menu];
[pool release];
unblock_input ();
}