diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index d31178d3f2e..e953b52db02 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -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)