aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong <[email protected]>2008-10-08 22:59:02 +0000
committerChong Yidong <[email protected]>2008-10-08 22:59:02 +0000
commitf3d295514c7d0e320a8b3b407369158fe0790d7f (patch)
tree95f8686a5417e4783264181206f2f6cae585e310
parentedc3ecf3972954d8f11f57ed54d45cc055ccb0ea (diff)
(fontset_find_font): Check frame validity.
-rw-r--r--src/fontset.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fontset.c b/src/fontset.c
index 2979afe55f..8061a2b90a 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))