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

CORE-15433
This commit is contained in:
Katayama Hirofumi MZ 2018-12-11 18:32:39 +09:00 committed by GitHub
parent 06d717e3bc
commit 43e2089476
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);