[0.4.11] [WIN32SS][FONT] Check NULL of Face->style_name (#1113)

CORE-15433
cherry picked from commit 0.4.12-dev-20-g
43e2089476
This commit is contained in:
Katayama Hirofumi MZ 2018-12-11 18:32:39 +09:00 committed by Joachim Henze
parent ba9846cda9
commit 7d0eadda9f

View file

@ -1095,7 +1095,8 @@ IntGdiLoadFontsFromMemory(PGDI_LOAD_FONT pLoadFont,
Status = RtlAnsiStringToUnicodeString(&Entry->FaceName, &AnsiString, TRUE);
if (NT_SUCCESS(Status))
{
if (Face->style_name[0] && strcmp(Face->style_name, "Regular"))
if (Face->style_name && Face->style_name[0] &&
strcmp(Face->style_name, "Regular") != 0)
{
RtlInitAnsiString(&AnsiString, Face->style_name);
Status = RtlAnsiStringToUnicodeString(&Entry->StyleName, &AnsiString, TRUE);