/* Non-zero if this frame's faces need to be recomputed. */
bool_bf face_change : 1;
- /* Non-zero if this frame's image cache cannot be freed because the
- frame is in the process of being redisplayed. */
+ /* Non-zero if this frame's image cache and face cache cannot be
+ freed because the frame is in the process of being redisplayed. */
bool_bf inhibit_clear_image_cache : 1;
/* True when new_width or new_height were set by change_frame_size,
if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
{
- /* Don't allow freeing images for this frame as long
- as the frame's update wasn't completed. This
- prevents crashes when some Lisp that runs from
- the various hooks or font-lock decides to clear
- the frame's image cache, when the images in that
- cache are referenced by the desired matrix. */
+ /* 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
+ that runs from the various hooks or font-lock
+ decides to clear the frame's image cache and face
+ cache, when the images and faces in those caches
+ are referenced by the desired matrix. */
f->inhibit_clear_image_cache = true;
redisplay_windows (FRAME_ROOT_WINDOW (f));
}
{
struct frame *f = XFRAME (frame);
if (FRAME_WINDOW_P (f)
- && FRAME_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS)
+ && FRAME_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS
+ && !f->inhibit_clear_image_cache)
{
clear_font_cache (f);
free_all_realized_faces (frame);