]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fhandle_switch_frame): Ignore switch to dead frame.
authorKarl Heuer <kwzh@gnu.org>
Mon, 14 Mar 1994 22:30:12 +0000 (22:30 +0000)
committerKarl Heuer <kwzh@gnu.org>
Mon, 14 Mar 1994 22:30:12 +0000 (22:30 +0000)
src/frame.c

index e7bdc953fb3d38c68753bf2337e8a5b0d26f3dfe..6a422d037a2ca1d535044e86c29a9b75ec5f7d25 100644 (file)
@@ -363,7 +363,12 @@ to that frame.")
       && CONSP (XCONS (frame)->cdr))
     frame = XCONS (XCONS (frame)->cdr)->car;
 
-  CHECK_LIVE_FRAME (frame, 0);
+  /* This used to say CHECK_LIVE_FRAME, but apparently it's possible for
+     a switch-frame event to arrive after a frame is no longer live,
+     especially when deleting the initial frame during startup.  */
+  CHECK_FRAME (frame, 0);
+  if (! FRAME_LIVE_P (XFRAME (frame)))
+    return Qnil;
 
   if (selected_frame == XFRAME (frame))
     return frame;