Fix bug#66151
authorPo Lu <luangruo@yahoo.com>
Tue, 7 May 2024 00:51:25 +0000 (08:51 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 7 May 2024 00:53:56 +0000 (08:53 +0800)
* src/fontset.c (free_realized_fontsets): Never call
recompute_basic_faces on dead frames.  (bug#66151)

src/fontset.c

index d27fa22015e79997f49d7621407a5bec505ba558..dfa0d59d31de586219ce84d749dbb171ec73310f 100644 (file)
@@ -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;
        }
     }