changeset 105148:23b427643575

(EmacsMenu-menuNeedsUpdate): Ignore if frame has been deleted (bug #4492).
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Tue, 22 Sep 2009 19:49:50 +0000
parents 4508a8827944
children 71b2d1ad08b6
files src/nsmenu.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/nsmenu.m	Tue Sep 22 19:49:06 2009 +0000
+++ b/src/nsmenu.m	Tue Sep 22 19:49:50 2009 +0000
@@ -568,7 +568,10 @@
    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.