diff options
author | Adrian Robert <Adrian.B.Robert@gmail.com> | 2009-09-22 19:49:50 +0000 |
---|---|---|
committer | Adrian Robert <Adrian.B.Robert@gmail.com> | 2009-09-22 19:49:50 +0000 |
commit | 201949c3a207698d21ab94a7cfb84137ef4a0407 (patch) | |
tree | f371d55d9314a9dfb345080bedd0a5ed35c53138 /src/nsmenu.m | |
parent | 4eb34cc713a8144c0edaea04496a0a05acee01de (diff) | |
download | emacs-201949c3a207698d21ab94a7cfb84137ef4a0407.tar.gz |
(EmacsMenu-menuNeedsUpdate): Ignore if frame has been deleted (bug #4492).
Diffstat (limited to 'src/nsmenu.m')
-rw-r--r-- | src/nsmenu.m | 5 |
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) to set_frame_menubar */ - (void)menuNeedsUpdate: (NSMenu *)menu { - NSEvent *event = [[FRAME_NS_VIEW (frame) window] currentEvent]; + NSEvent *event; + if (!FRAME_LIVE_P (frame)) + return; + event = [[FRAME_NS_VIEW (frame) window] currentEvent]; /* HACK: Cocoa/Carbon will request update on every keystroke via IsMenuKeyEvent -> CheckMenusForKeyEvent. These are not needed since key equivalents are handled through emacs. |