[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c690d1f15d: Fix nsmenu crash when exiting popup dialog
From: |
Po Lu |
Subject: |
master c690d1f15d: Fix nsmenu crash when exiting popup dialog |
Date: |
Wed, 5 Oct 2022 22:54:29 -0400 (EDT) |
branch: master
commit c690d1f15d274d50ed21d4aa1b98a23de8d7e1e6
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix nsmenu crash when exiting popup dialog
* 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)
---
src/nsmenu.m | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/nsmenu.m b/src/nsmenu.m
index ae795a0d22..b06f737bac 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1551,7 +1551,6 @@ pop_down_menu (void *arg)
#ifdef NS_IMPL_COCOA
[[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow];
#endif
- discard_menu_items ();
}
}
@@ -1599,6 +1598,7 @@ ns_popup_dialog (struct frame *f, Lisp_Object header,
Lisp_Object contents)
if (error_name)
{
+ unbind_to (specpdl_count, Qnil);
discard_menu_items ();
[dialog close];
error ("%s", error_name);
@@ -1608,6 +1608,9 @@ ns_popup_dialog (struct frame *f, Lisp_Object header,
Lisp_Object contents)
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;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master c690d1f15d: Fix nsmenu crash when exiting popup dialog,
Po Lu <=