Commit cee69310 authored by Dan Kegel's avatar Dan Kegel Committed by Alexandre Julliard

gdiplus/tests: Don't free if alloc failed.

parent 43324faf
......@@ -34,6 +34,7 @@ static void test_Scan0(void)
stat = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat24bppRGB, NULL, &bm);
expect(Ok, stat);
ok(NULL != bm, "Expected bitmap to be initialized\n");
if (stat == Ok)
GdipDisposeImage((GpImage*)bm);
bm = (GpBitmap*)0xdeadbeef;
......@@ -58,6 +59,7 @@ static void test_Scan0(void)
stat = GdipCreateBitmapFromScan0(10, 10, 12, PixelFormat24bppRGB, buff, &bm);
expect(Ok, stat);
ok(NULL != bm, "Expected bitmap to be initialized\n");
if (stat == Ok)
GdipDisposeImage((GpImage*)bm);
bm = (GpBitmap*) 0xdeadbeef;
......
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