Skip to content

Commit 7d0eadd

Browse files
katahiromzJoachimHenze
authored andcommitted
[0.4.11] [WIN32SS][FONT] Check NULL of Face->style_name (reactos#1113)
CORE-15433 cherry picked from commit 0.4.12-dev-20-g 43e2089
1 parent ba9846c commit 7d0eadd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

win32ss/gdi/ntgdi/freetype.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,8 @@ IntGdiLoadFontsFromMemory(PGDI_LOAD_FONT pLoadFont,
10951095
Status = RtlAnsiStringToUnicodeString(&Entry->FaceName, &AnsiString, TRUE);
10961096
if (NT_SUCCESS(Status))
10971097
{
1098-
if (Face->style_name[0] && strcmp(Face->style_name, "Regular"))
1098+
if (Face->style_name && Face->style_name[0] &&
1099+
strcmp(Face->style_name, "Regular") != 0)
10991100
{
11001101
RtlInitAnsiString(&AnsiString, Face->style_name);
11011102
Status = RtlAnsiStringToUnicodeString(&Entry->StyleName, &AnsiString, TRUE);

0 commit comments

Comments
 (0)