Commit f6f2f934 authored by Alexandre Julliard's avatar Alexandre Julliard

gdiplus/tests: Don't free GDI objects with GlobalFree.

parent e10f24e8
...@@ -480,7 +480,7 @@ static void test_GdipCreateBitmapFromHBITMAP(void) ...@@ -480,7 +480,7 @@ static void test_GdipCreateBitmapFromHBITMAP(void)
expectf(HEIGHT1, height); expectf(HEIGHT1, height);
if (stat == Ok) if (stat == Ok)
GdipDisposeImage((GpImage*)gpbm); GdipDisposeImage((GpImage*)gpbm);
GlobalFree(hbm); DeleteObject(hbm);
hbm = CreateBitmap(WIDTH2, HEIGHT2, 1, 1, &buff); hbm = CreateBitmap(WIDTH2, HEIGHT2, 1, 1, &buff);
stat = GdipCreateBitmapFromHBITMAP(hbm, NULL, &gpbm); stat = GdipCreateBitmapFromHBITMAP(hbm, NULL, &gpbm);
...@@ -493,7 +493,7 @@ static void test_GdipCreateBitmapFromHBITMAP(void) ...@@ -493,7 +493,7 @@ static void test_GdipCreateBitmapFromHBITMAP(void)
expectf(HEIGHT2, height); expectf(HEIGHT2, height);
if (stat == Ok) if (stat == Ok)
GdipDisposeImage((GpImage*)gpbm); GdipDisposeImage((GpImage*)gpbm);
GlobalFree(hbm); DeleteObject(hbm);
hdc = CreateCompatibleDC(0); hdc = CreateCompatibleDC(0);
ok(hdc != NULL, "CreateCompatibleDC failed\n"); ok(hdc != NULL, "CreateCompatibleDC failed\n");
...@@ -530,8 +530,8 @@ static void test_GdipCreateBitmapFromHBITMAP(void) ...@@ -530,8 +530,8 @@ static void test_GdipCreateBitmapFromHBITMAP(void)
if (stat == Ok) if (stat == Ok)
GdipDisposeImage((GpImage*)gpbm); GdipDisposeImage((GpImage*)gpbm);
GlobalFree(hpal); DeleteObject(hpal);
GlobalFree(hbm); DeleteObject(hbm);
} }
static void test_GdipGetImageFlags(void) static void test_GdipGetImageFlags(void)
......
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