]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_supports_face_attributes_p): Check face->font before
authorKenichi Handa <handa@m17n.org>
Mon, 2 Jun 2008 01:49:47 +0000 (01:49 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 2 Jun 2008 01:49:47 +0000 (01:49 +0000)
comparing the properties.

src/ChangeLog
src/xfaces.c

index c6aab2c264e5a05c021e50f18cc6cdcb68858a28..dc54ddaddd957d206c06ed6a2e594262527aef35 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-02  Kenichi Handa  <handa@m17n.org>
+
+       * xfaces.c (x_supports_face_attributes_p): Check face->font before
+       comparing the properties.
+
 2008-06-01  Jason Rumney  <jasonr@gnu.org>
 
         * w32font.c (w32_enumfont_pattern_entity): Use requested registry.
index 074b71b13c1af200825f290bbc57fe9528a422ce..2b85cfb6605b2645c34fe46ac7714a78bdfe12d3 100644 (file)
@@ -5036,8 +5036,10 @@ x_supports_face_attributes_p (f, attrs, def_face)
       if (! face)
        error ("Cannot make face");
 
-      /* If the font is the same, then not supported.  */
-      if (face->font == def_face->font)
+      /* If the font is the same, or no font is found, then not
+        supported.  */
+      if (face->font == def_face->font
+         || ! face->font)
        return 0;
       for (i = FONT_TYPE_INDEX; i <= FONT_SIZE_INDEX; i++)
        if (! EQ (face->font->props[i], def_face->font->props[i]))