gdiplus/tests: Fix some leaks when running with Wine (Valgrind).

This commit is contained in:
Nikolay Sivov 2014-04-25 13:49:41 +04:00 committed by Alexandre Julliard
parent db49dec825
commit d68dde3751
1 changed files with 6 additions and 0 deletions

View File

@ -798,17 +798,23 @@ static void test_font_substitution(void)
lf.lfWeight = 0;
lf.lfCharSet = 0;
lstrcpyA(lf.lfFaceName, "ThisFontShouldNotExist");
font = NULL;
status = GdipCreateFontFromLogfontA(hdc, &lf, &font);
todo_wine
ok(status == NotTrueTypeFont || broken(status == FileNotFound), /* before XP */
"expected NotTrueTypeFont, got %d\n", status);
/* FIXME: remove when wine is fixed */
if (font) GdipDeleteFont(font);
/* empty FaceName */
lf.lfFaceName[0] = 0;
font = NULL;
status = GdipCreateFontFromLogfontA(hdc, &lf, &font);
todo_wine
ok(status == NotTrueTypeFont || broken(status == FileNotFound), /* before XP */
"expected NotTrueTypeFont, got %d\n", status);
/* FIXME: remove when wine is fixed */
if (font) GdipDeleteFont(font);
GdipDeleteGraphics(graphics);
DeleteDC(hdc);