From ad491c80e4b0cfc5be049eb397aa535ed74eade8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 10 Dec 2017 10:42:34 +0200 Subject: [PATCH] Avoid crashes in 'font-at' after 'set-fontset-font' * src/fontset.c (free_realized_fontsets): Call recompute_basic_faces, so that the basic faces are available to any Lisp that calls this function, e.g. via set-fontset-font. (Bug#29632) --- src/fontset.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fontset.c b/src/fontset.c index 35586ad5c7d..985800103d2 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1325,6 +1325,10 @@ free_realized_fontsets (Lisp_Object base) if (CHAR_TABLE_P (this) && EQ (FONTSET_BASE (this), base)) { Fclear_face_cache (Qt); + /* This is in case some Lisp calls this function and then + proceeds with calling some other function, like font-at, + which needs the basic faces. */ + recompute_basic_faces (XFRAME (FONTSET_FRAME (this))); break; } } -- 2.39.2