Commit 46384145 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

CreateFontIndirect() can get NULL pointers.

parent 1c80bc92
......@@ -353,8 +353,12 @@ HFONT WINAPI CreateFontIndirectA( const LOGFONTA *font )
{
LOGFONT16 font16;
FONT_LogFont32ATo16( font, &font16 );
return CreateFontIndirect16( &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;
FONT_LogFont32WTo16( font, &font16 );
return CreateFontIndirect16( &font16 );
if (font) {
FONT_LogFont32WTo16( font, &font16 );
return CreateFontIndirect16( &font16 );
} else
return CreateFontIndirect16( NULL );
}
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment