James Hawkins : gdi32: Remove a dependency on the amount of available memory.

Alexandre Julliard julliard at winehq.org
Thu May 1 06:39:03 CDT 2008


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

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Thu May  1 01:29:24 2008 -0500

gdi32: Remove a dependency on the amount of available memory.

---

 dlls/gdi32/tests/bitmap.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c
index 27a6c88..2ef2891 100644
--- a/dlls/gdi32/tests/bitmap.c
+++ b/dlls/gdi32/tests/bitmap.c
@@ -982,10 +982,14 @@ static void test_bitmap(void)
 
     SetLastError(0xdeadbeef);
     hbmp = CreateBitmap(0x7ffffff, 9, 1, 1, NULL);
-    ok(!hbmp, "CreateBitmap should fail\n");
-    ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY /* XP */ ||
-       GetLastError() == ERROR_INVALID_PARAMETER /* Win2k */,
-       "expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError());
+    if (!hbmp)
+    {
+        ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY /* XP */ ||
+           GetLastError() == ERROR_INVALID_PARAMETER /* Win2k */,
+           "expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError());
+    }
+    else
+        DeleteObject(hbmp);
 
     SetLastError(0xdeadbeef);
     hbmp = CreateBitmap(0x7ffffff + 1, 1, 1, 1, NULL);




More information about the wine-cvs mailing list