changeset 98575:7e4ece224094

(fontset_find_font): Check frame validity.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 08 Oct 2008 22:59:02 +0000
parents 1f95f4e947f5
children 5472a993dc3a
files src/fontset.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/fontset.c	Wed Oct 08 22:58:55 2008 +0000
+++ b/src/fontset.c	Wed Oct 08 22:59:02 2008 +0000
@@ -516,9 +516,9 @@
      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))