If a client connection comes in while we handle a Lisp error,
the new frame creation could signal an error before the new
frame is ready for display.
* src/xdisp.c (redisplay_internal): Don't redisplay windows on
frames that were not completely set up. (Bug#71224)
(cherry picked from commit
e99a821f978530b4c397f88de145ff7ba9d31040)
= f->redisplay || !REDISPLAY_SOME_P ();
bool f_redisplay_flag = f->redisplay;
- /* The X error handler may have deleted that frame
- before we went back to retry_frame. This must come
+ /* The X error handler may have deleted that frame before
+ we went back to retry_frame. Or this could be a TTY
+ frame that is not completely made, in which case we
+ cannot safely redisplay its windows. This must come
before any accesses to f->terminal. */
- if (!FRAME_LIVE_P (f))
+ if (!FRAME_LIVE_P (f)
+ || (FRAME_TERMCAP_P (f) && !f->after_make_frame))
continue;
/* Mark all the scroll bars to be removed; we'll redeem