From 0992335d128f6fc2ac1b5abc4f4106e58110a6da Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 31 Jul 2021 09:28:36 +0300 Subject: [PATCH] * src/fontset.c (check_fontset_name): A better fix for bug#49782. --- src/fontset.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/fontset.c b/src/fontset.c index d2d428da2ee..7d4bd65f70c 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); -- 2.39.2