changeset 6352:6f48bd9145f9

(Fhandle_switch_frame): Ignore switch to dead frame.
author Karl Heuer <kwzh@gnu.org>
date Mon, 14 Mar 1994 22:30:12 +0000
parents 377e82e70f7e
children f00fc681daa4
files src/frame.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Mon Mar 14 22:10:04 1994 +0000
+++ b/src/frame.c	Mon Mar 14 22:30:12 1994 +0000
@@ -363,7 +363,12 @@
       && 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;