From: Po Lu Date: Tue, 7 May 2024 00:51:25 +0000 (+0800) Subject: Fix bug#66151 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2c9417fa1d4255a44a1dd65a2d14abdf65df1190;p=emacs.git Fix bug#66151 * src/fontset.c (free_realized_fontsets): Never call recompute_basic_faces on dead frames. (bug#66151) (cherry picked from commit 6583916a058324f857d83af5a716d1142f94758f) --- diff --git a/src/fontset.c b/src/fontset.c index d27fa22015e..dfa0d59d31d 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1366,10 +1366,11 @@ 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))); + if (FRAME_LIVE_P (XFRAME (FONTSET_FRAME (this)))) + /* 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; } }