aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdrian Robert2009-09-22 19:49:50 +0000
committerAdrian Robert2009-09-22 19:49:50 +0000
commit201949c3a207698d21ab94a7cfb84137ef4a0407 (patch)
treef371d55d9314a9dfb345080bedd0a5ed35c53138 /src
parent4eb34cc713a8144c0edaea04496a0a05acee01de (diff)
downloademacs-201949c3a207698d21ab94a7cfb84137ef4a0407.tar.gz
emacs-201949c3a207698d21ab94a7cfb84137ef4a0407.zip
(EmacsMenu-menuNeedsUpdate): Ignore if frame has been deleted (bug #4492).
Diffstat (limited to 'src')
-rw-r--r--src/nsmenu.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 335e4c0e640..79644d28a80 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -568,7 +568,10 @@ name_is_separator (name)
568 to set_frame_menubar */ 568 to set_frame_menubar */
569- (void)menuNeedsUpdate: (NSMenu *)menu 569- (void)menuNeedsUpdate: (NSMenu *)menu
570{ 570{
571 NSEvent *event = [[FRAME_NS_VIEW (frame) window] currentEvent]; 571 NSEvent *event;
572 if (!FRAME_LIVE_P (frame))
573 return;
574 event = [[FRAME_NS_VIEW (frame) window] currentEvent];
572 /* HACK: Cocoa/Carbon will request update on every keystroke 575 /* HACK: Cocoa/Carbon will request update on every keystroke
573 via IsMenuKeyEvent -> CheckMenusForKeyEvent. These are not needed 576 via IsMenuKeyEvent -> CheckMenusForKeyEvent. These are not needed
574 since key equivalents are handled through emacs. 577 since key equivalents are handled through emacs.