[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: |
Eli Zaretskii |
Subject: |
bug#37637: 27.0.50; Segmentation fault when setting font face for new frames |
Date: |
Tue, 08 Oct 2019 16:15:06 +0300 |
> Date: Tue, 08 Oct 2019 14:56:58 +0200
> From: Andreas Hilboll <andreas.hilboll@posteo.de>
>
> > 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, pushed to the master branch, and closing the bug report.