[WIN32SS] Only access a font face if it was actually loaded

This commit is contained in:
Mark Jansen 2019-08-04 00:12:34 +02:00
parent ce2f52d054
commit 35dc022e14
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -1154,8 +1154,11 @@ IntGdiLoadFontsFromMemory(PGDI_LOAD_FONT pLoadFont)
pLoadFont->Memory->BufferSize,
-1,
&Face);
FaceCount = Face->num_faces;
FT_Done_Face(Face);
if (!Error)
{
FaceCount = Face->num_faces;
FT_Done_Face(Face);
}
IntUnLockFreeType();
if (Error)