* src/nsmenu.m (pop_down_menu): Do not discard menu items here.
(ns_popup_dialog): Call discard_menu_items after
unuse_menu_items. (bug#58296)
#ifdef NS_IMPL_COCOA
[[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow];
#endif
- discard_menu_items ();
}
}
if (error_name)
{
+ unbind_to (specpdl_count, Qnil);
discard_menu_items ();
[dialog close];
error ("%s", error_name);
popup_activated_flag = 1;
tem = [dialog runDialogAt: p];
unbind_to (specpdl_count, Qnil);
+
+ /* This must come *after* unuse_menu_items. */
+ discard_menu_items ();
return tem;
}