gdiplus: Don't create a font if there is no facename.
This commit is contained in:
parent
5361f074a3
commit
74c8117a4b
|
@ -169,6 +169,9 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
|
|||
if(!logfont || !font)
|
||||
return InvalidParameter;
|
||||
|
||||
if (logfont->lfFaceName[0] == 0)
|
||||
return NotTrueTypeFont;
|
||||
|
||||
*font = GdipAlloc(sizeof(GpFont));
|
||||
if(!*font) return OutOfMemory;
|
||||
|
||||
|
|
|
@ -112,9 +112,7 @@ static void test_logfont(void)
|
|||
lfw.lfFaceName[0] = 0;
|
||||
stat = GdipCreateFontFromLogfontW(hdc, &lfw, &font);
|
||||
|
||||
todo_wine {
|
||||
expect(NotTrueTypeFont, stat);
|
||||
}
|
||||
|
||||
memcpy(&lfw.lfFaceName, arial, 6 * sizeof(WCHAR));
|
||||
|
||||
|
|
Loading…
Reference in New Issue