(x_supports_face_attributes_p): Check face->font before

comparing the properties.
This commit is contained in:
Kenichi Handa 2008-06-02 01:49:47 +00:00
parent fd2ae9b27e
commit 4fc1984a7e
2 changed files with 9 additions and 2 deletions

View 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.

View 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]))