diff --git a/src/xdisp.c b/src/xdisp.c index 4e5250486f5..ea2d11e8b4e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -16867,6 +16867,10 @@ redisplay_internal (void) else if (!REDISPLAY_SOME_P ()) f->redisplay = true; + /* The X error handler may have deleted that frame. */ + if (!FRAME_LIVE_P (f)) + continue; + /* Any scroll bars which redisplay_windows should have nuked should now go away. */ if (gcscrollbars && FRAME_TERMINAL (f)->judge_scroll_bars_hook)