Commit 8db811ef authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix bug #18162 with assertion violations due to empty face cache.

 src/fontset.c (Finternal_char_font): Recompute basic faces if the
 frame's face cache was cleared.
parent 6df16fba
2014-08-07 Eli Zaretskii <eliz@gnu.org>
* fontset.c (Finternal_char_font): Recompute basic faces if the
frame's face cache was cleared. (Bug#18162)
2014-08-05 Dmitry Antipov <dmantipov@yandex.ru> 2014-08-05 Dmitry Antipov <dmantipov@yandex.ru>
Fix bug with uninitialized undo list of an indirect buffer (Bug#18180). Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
......
...@@ -1860,6 +1860,10 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0, ...@@ -1860,6 +1860,10 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
return Qnil; return Qnil;
if (!FRAME_WINDOW_P (f)) if (!FRAME_WINDOW_P (f))
return Qnil; return Qnil;
/* We need the basic faces to be valid below, so recompute them if
some code just happened to clear the face cache. */
if (FRAME_FACE_CACHE (f)->used == 0)
recompute_basic_faces (f);
face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil); face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil);
face = FACE_FROM_ID (f, face_id); face = FACE_FROM_ID (f, face_id);
if (face->font) if (face->font)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment