/* Only GC scrollbars when we redisplay the whole frame. */
= 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
+ before any accesses to f->terminal. */
+ if (!FRAME_LIVE_P (f))
+ continue;
+
/* Mark all the scroll bars to be removed; we'll redeem
the ones we want when we redisplay their windows. */
if (gcscrollbars && FRAME_TERMINAL (f)->condemn_scroll_bars_hook)
if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
{
-
/* Don't allow freeing images and faces for this
frame as long as the frame's update wasn't
completed. This prevents crashes when some Lisp
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)