CreateFontIndirect() can get NULL pointers.
This commit is contained in:
parent
1c80bc927e
commit
46384145ed
|
@ -353,8 +353,12 @@ HFONT WINAPI CreateFontIndirectA( const LOGFONTA *font )
|
|||
{
|
||||
LOGFONT16 font16;
|
||||
|
||||
if (font) {
|
||||
FONT_LogFont32ATo16( font, &font16 );
|
||||
return CreateFontIndirect16( &font16 );
|
||||
} else
|
||||
return CreateFontIndirect16( NULL );
|
||||
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -364,8 +368,11 @@ HFONT WINAPI CreateFontIndirectW( const LOGFONTW *font )
|
|||
{
|
||||
LOGFONT16 font16;
|
||||
|
||||
if (font) {
|
||||
FONT_LogFont32WTo16( font, &font16 );
|
||||
return CreateFontIndirect16( &font16 );
|
||||
} else
|
||||
return CreateFontIndirect16( NULL );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in New Issue