From be22aa971355e15a78d46c60ce285afd474da313 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 6 Jul 2008 03:51:06 +0000 Subject: [PATCH] (set_font_frame_param): Don't try to set the font parameter if it is still unspecified in the lface. --- src/xfaces.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index 382e1327679..ed802b03f7c 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3501,11 +3501,14 @@ set_font_frame_param (frame, lface) Lisp_Object frame, lface; { struct frame *f = XFRAME (frame); + Lisp_Object font; - if (FRAME_WINDOW_P (f)) + if (FRAME_WINDOW_P (f) + /* Don't do anything if the font is `unspecified'. This can + happen during frame creation. */ + && (font = LFACE_FONT (lface), + ! UNSPECIFIEDP (font))) { - Lisp_Object font = LFACE_FONT (lface); - if (FONT_SPEC_P (font)) { font = font_load_for_lface (f, XVECTOR (lface)->contents, font); -- 2.39.2