diff src/xfaces.c @ 90718:f1d13e615070

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 523-544) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 168-171) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-150
author Miles Bader <miles@gnu.org>
date Thu, 07 Dec 2006 04:14:14 +0000
parents dbe3f29e61d6 cd686b5380c4
children 95d0cdf160ea
line wrap: on
line diff
--- a/src/xfaces.c	Thu Dec 07 00:45:27 2006 +0000
+++ b/src/xfaces.c	Thu Dec 07 04:14:14 2006 +0000
@@ -7534,10 +7534,18 @@
 #ifdef HAVE_WINDOW_SYSTEM
 #ifdef HAVE_X_WINDOWS
   if (face->font != FRAME_FONT (f))
-    /* As the font specified for the frame was not acceptable as a
-       font for the default face (perhaps because auto-scaled fonts
-       are rejected), we must adjust the frame font.  */
-    x_set_font (f, build_string (face->font_name), Qnil);
+    {
+      /* This can happen when making a frame on a display that does
+	 not support the default font.  */
+      if (!face->font)
+	return 0;
+
+      /* Otherwise, the font specified for the frame was not
+	 acceptable as a font for the default face (perhaps because
+	 auto-scaled fonts are rejected), so we must adjust the frame
+	 font.  */
+      x_set_font (f, build_string (face->font_name), Qnil);
+    }
 #endif	/* HAVE_X_WINDOWS */
 #endif	/* HAVE_WINDOW_SYSTEM */
   return 1;