summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xps/xps_glyphs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xps/xps_glyphs.c b/xps/xps_glyphs.c
index 6a7a1dcc..6b262016 100644
--- a/xps/xps_glyphs.c
+++ b/xps/xps_glyphs.c
@@ -46,7 +46,7 @@ xps_encode_font_char(fz_font *font, int code)
{
FT_Face face = font->ft_face;
int gid = FT_Get_Char_Index(face, code);
- if (gid == 0 && face->charmap->platform_id == 3 && face->charmap->encoding_id == 0)
+ if (gid == 0 && face->charmap && face->charmap->platform_id == 3 && face->charmap->encoding_id == 0)
gid = FT_Get_Char_Index(face, 0xF000 | code);
return gid;
}