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

Alexandre Julliard julliard at winehq.org
Wed May 6 10:33:16 CDT 2009


Module: wine
Branch: master
Commit: f6f2f9346eb2dc1b5ce076572664f008559e31a8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f6f2f9346eb2dc1b5ce076572664f008559e31a8

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed May  6 16:45:05 2009 +0200

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

---

 dlls/gdiplus/tests/image.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 4c836cd..4443f88 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -480,7 +480,7 @@ static void test_GdipCreateBitmapFromHBITMAP(void)
     expectf(HEIGHT1, height);
     if (stat == Ok)
         GdipDisposeImage((GpImage*)gpbm);
-    GlobalFree(hbm);
+    DeleteObject(hbm);
 
     hbm = CreateBitmap(WIDTH2, HEIGHT2, 1, 1, &buff);
     stat = GdipCreateBitmapFromHBITMAP(hbm, NULL, &gpbm);
@@ -493,7 +493,7 @@ static void test_GdipCreateBitmapFromHBITMAP(void)
     expectf(HEIGHT2, height);
     if (stat == Ok)
         GdipDisposeImage((GpImage*)gpbm);
-    GlobalFree(hbm);
+    DeleteObject(hbm);
 
     hdc = CreateCompatibleDC(0);
     ok(hdc != NULL, "CreateCompatibleDC failed\n");
@@ -530,8 +530,8 @@ static void test_GdipCreateBitmapFromHBITMAP(void)
     if (stat == Ok)
         GdipDisposeImage((GpImage*)gpbm);
 
-    GlobalFree(hpal);
-    GlobalFree(hbm);
+    DeleteObject(hpal);
+    DeleteObject(hbm);
 }
 
 static void test_GdipGetImageFlags(void)




More information about the wine-cvs mailing list