From: Chong Yidong Date: Wed, 8 Oct 2008 22:59:02 +0000 (+0000) Subject: (fontset_find_font): Check frame validity. X-Git-Tag: emacs-pretest-23.0.90~2594 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f3d295514c7d0e320a8b3b407369158fe0790d7f;p=emacs.git (fontset_find_font): Check frame validity. --- diff --git a/src/fontset.c b/src/fontset.c index 2979afe55fb..8061a2b90ab 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -516,9 +516,9 @@ fontset_find_font (fontset, c, face, id, fallback) int id, fallback; { Lisp_Object elt, vec, font_group; - int i; - FRAME_PTR f = XFRAME (FONTSET_FRAME (fontset)); - int charset_matched = -1; + int i, charset_matched = -1; + FRAME_PTR f = (FRAMEP (FONTSET_FRAME (fontset))) + ? XFRAME (selected_frame) : XFRAME (FONTSET_FRAME (fontset)); font_group = fontset_get_font_group (fontset, fallback ? -1 : c); if (! CONSP (font_group))