bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37637: 27.0.50; Segmentation fault when setting font face for new fr


From: Andreas Hilboll
Subject: bug#37637: 27.0.50; Segmentation fault when setting font face for new frames
Date: Tue, 08 Oct 2019 14:56:58 +0200
User-agent: Posteo Webmail

Thanks, please see if the patch below gives good results.

diff --git a/src/font.c b/src/font.c
index 935dd64..044c437 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3314,6 +3314,9 @@ font_open_for_lface (struct frame *f,
Lisp_Object entity, Lisp_Object *attrs, Li
            pt = XFIXNUM (attrs[LFACE_HEIGHT_INDEX]);
          else
            {
+             /* We need the default face to be valid below.  */
+             if (FRAME_FACE_CACHE (f)->used == 0)
+               recompute_basic_faces (f);
              struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID);
              Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX];
              eassert (FIXNUMP (height));

Great, this seems to fix it. Works without problems now (after opening ~10 new frames without any crash I stopped ...).

Thanks for the quick help!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]