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

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

bug#49782: 28.0.50; set-fontset-font crashes in init (server)


From: Eli Zaretskii
Subject: bug#49782: 28.0.50; set-fontset-font crashes in init (server)
Date: Fri, 30 Jul 2021 21:19:52 +0300

> From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
> Cc: 49782@debbugs.gnu.org
> Date: Fri, 30 Jul 2021 19:50:37 +0200
> 
> > Does the patch below prevent the crash?
> >
> > diff --git a/src/fontset.c b/src/fontset.c
> > index 332be6c..52c7e38 100644
> > --- a/src/fontset.c
> > +++ b/src/fontset.c
> > @@ -1356,6 +1356,9 @@ check_fontset_name (Lisp_Object name, Lisp_Object 
> > *frame)
> >    int id;
> >    struct frame *f = decode_live_frame (*frame);
> >  
> > +  if (!FRAME_WINDOW_P (f))
> > +    error ("Can't use fontsets in non-GUI frames");
> > +
> >    XSETFRAME (*frame, f);
> 
> This works.  At least it tells what the problem is.  The error could
> even be caught.

Thanks, I installed the change on the master branch.

> But what I actually want is probably display-multi-font-p, right?

If you want to add the condition to your code, yes.





reply via email to

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