# HG changeset patch # User Karl Heuer # Date 763684212 0 # Node ID 6f48bd9145f962c7b5836b52399f113ebfc0e1ca # Parent 377e82e70f7e364359a92171cab7ead6daabaf1d (Fhandle_switch_frame): Ignore switch to dead frame. diff -r 377e82e70f7e -r 6f48bd9145f9 src/frame.c --- 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;