diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index ca1285a4ae7..7488e00c913 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -4490,6 +4490,9 @@ ftGetFontUnicodeRanges(PFONTGDI Font, PGLYPHSET glyphset) DWORD num_ranges = 0; FT_Face face = Font->SharedFace->Face; + if(!face) return 0; + if(!face->charmap) return 0; + if (face->charmap->encoding == FT_ENCODING_UNICODE) { FT_UInt glyph_code = 0;