aboutsummaryrefslogtreecommitdiffstats
path: root/src/fontset.c
diff options
context:
space:
mode:
authorEli Zaretskii2017-12-10 10:42:34 +0200
committerEli Zaretskii2017-12-10 10:42:34 +0200
commitad491c80e4b0cfc5be049eb397aa535ed74eade8 (patch)
tree73d58f016001dd134b9be7d8ec06a789ab35942b /src/fontset.c
parentc73d2cdfd738186a3b4e44e3fcec4a9f10b9b644 (diff)
downloademacs-ad491c80e4b0cfc5be049eb397aa535ed74eade8.tar.gz
emacs-ad491c80e4b0cfc5be049eb397aa535ed74eade8.zip
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)
Diffstat (limited to 'src/fontset.c')
-rw-r--r--src/fontset.c4
1 files changed, 4 insertions, 0 deletions
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)
1325 if (CHAR_TABLE_P (this) && EQ (FONTSET_BASE (this), base)) 1325 if (CHAR_TABLE_P (this) && EQ (FONTSET_BASE (this), base))
1326 { 1326 {
1327 Fclear_face_cache (Qt); 1327 Fclear_face_cache (Qt);
1328 /* This is in case some Lisp calls this function and then
1329 proceeds with calling some other function, like font-at,
1330 which needs the basic faces. */
1331 recompute_basic_faces (XFRAME (FONTSET_FRAME (this)));
1328 break; 1332 break;
1329 } 1333 }
1330 } 1334 }