[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 23:12:09 +0300 |
> Date: Fri, 30 Jul 2021 23:02:37 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 49782@debbugs.gnu.org
>
> > But that additional condition re-introduces the original problem.
>
> Then I'll need a backtrace from a live Emacs process with "xbacktrace"
> results as well, and in a build without optimizations, so I could see
> what's the difference between these two use cases.
But before you embark on that adventure, please try another stab in
the dark:
diff --git a/src/fontset.c b/src/fontset.c
index d2d428d..7d4bd65 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1356,15 +1356,16 @@ check_fontset_name (Lisp_Object name, Lisp_Object
*frame)
int id;
struct frame *f = decode_live_frame (*frame);
- if (!FRAME_WINDOW_P (f) && !FRAME_INITIAL_P (f))
- error ("Can't use fontsets in non-GUI frames");
-
XSETFRAME (*frame, f);
if (EQ (name, Qt))
return Vdefault_fontset;
if (NILP (name))
- id = FRAME_FONTSET (f);
+ {
+ if (!FRAME_WINDOW_P (f))
+ error ("Can't use fontsets in non-GUI frames");
+ id = FRAME_FONTSET (f);
+ }
else
{
CHECK_STRING (name);
bug#49782: 28.0.50; set-fontset-font crashes in init (server), Benjamin Riefenstahl, 2021/07/30