From: Eli Zaretskii Date: Sat, 31 Jul 2021 06:28:36 +0000 (+0300) Subject: * src/fontset.c (check_fontset_name): A better fix for bug#49782. X-Git-Tag: emacs-28.0.90~1638 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0992335d128f6fc2ac1b5abc4f4106e58110a6da;p=emacs.git * src/fontset.c (check_fontset_name): A better fix for bug#49782. --- 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);