Fix a segfault due to failure to realize some faces
* src/xdisp.c (redisplay_internal): If the frame becomes garbaged while redisplaying its windows, redisplay all of its windows again. (Bug#26097) (init_iterator): When freeing all realized faces on all frames, reset the 'face_change' flag of the frame whose window we are about to iterate.
This commit is contained in:
parent
1531c3c9f2
commit
8275687bb9
1 changed files with 11 additions and 0 deletions
11
src/xdisp.c
11
src/xdisp.c
|
@ -2716,6 +2716,7 @@ init_iterator (struct it *it, struct window *w,
|
|||
if (face_change)
|
||||
{
|
||||
face_change = false;
|
||||
XFRAME (w->frame)->face_change = 0;
|
||||
free_all_realized_faces (Qnil);
|
||||
}
|
||||
else if (XFRAME (w->frame)->face_change)
|
||||
|
@ -14072,6 +14073,7 @@ redisplay_internal (void)
|
|||
/* Only GC scrollbars when we redisplay the whole frame. */
|
||||
= f->redisplay || !REDISPLAY_SOME_P ();
|
||||
bool f_redisplay_flag = f->redisplay;
|
||||
bool f_garbaged_flag = FRAME_GARBAGED_P (f);
|
||||
/* 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)
|
||||
|
@ -14132,6 +14134,15 @@ redisplay_internal (void)
|
|||
Therefore, we must redisplay this frame. */
|
||||
if (!f_redisplay_flag && f->redisplay)
|
||||
goto retry_frame;
|
||||
/* Likewise with the frame's garbaged flag: it can
|
||||
get set inside redisplay_windows if some hook
|
||||
winds up calling adjust_frame_glyphs, for example. */
|
||||
if (!f_garbaged_flag && FRAME_GARBAGED_P (f))
|
||||
{
|
||||
f->garbaged = false;
|
||||
fset_redisplay (f);
|
||||
goto retry_frame;
|
||||
}
|
||||
|
||||
/* In some case (e.g., window resize), we notice
|
||||
only during window updating that the window
|
||||
|
|
Loading…
Add table
Reference in a new issue