Rob Shearman : comctl32: Don'
t free user32 objects with a gdi32 function in imagelist test.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Feb 19 07:02:06 CST 2007
Module: wine
Branch: master
Commit: 4ef244260837d61156054b4e5d5b3793cdb21bb6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4ef244260837d61156054b4e5d5b3793cdb21bb6
Author: Rob Shearman <rob at codeweavers.com>
Date: Sat Feb 17 20:18:58 2007 +0000
comctl32: Don't free user32 objects with a gdi32 function in imagelist test.
Use DestroyIcon for releasing the resources associated with created icons.
---
dlls/comctl32/tests/imagelist.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index f863455..1f9e2e6 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -340,10 +340,9 @@ static BOOL DoTest1(void)
/* destroy it */
ok(ImageList_Destroy(himl),"destroy imagelist failed\n");
- /* icons should be deleted by the imagelist */
- ok(!DeleteObject(hicon1),"icon 1 wasn't deleted\n");
- ok(!DeleteObject(hicon2),"icon 2 wasn't deleted\n");
- ok(!DeleteObject(hicon3),"icon 3 wasn't deleted\n");
+ ok(DestroyIcon(hicon1),"icon 1 wasn't deleted\n");
+ ok(DestroyIcon(hicon2),"icon 2 wasn't deleted\n");
+ ok(DestroyIcon(hicon3),"icon 3 wasn't deleted\n");
return TRUE;
}
@@ -376,10 +375,9 @@ static BOOL DoTest2(void)
/* destroy it */
ok(ImageList_Destroy(himl),"destroy imagelist failed\n");
- /* icons should be deleted by the imagelist */
- ok(!DeleteObject(hicon1),"icon 1 wasn't deleted\n");
- ok(!DeleteObject(hicon2),"icon 2 wasn't deleted\n");
- ok(!DeleteObject(hicon3),"icon 3 wasn't deleted\n");
+ ok(DestroyIcon(hicon1),"icon 1 wasn't deleted\n");
+ ok(DestroyIcon(hicon2),"icon 2 wasn't deleted\n");
+ ok(DestroyIcon(hicon3),"icon 3 wasn't deleted\n");
return TRUE;
}
@@ -551,7 +549,7 @@ static void testMerge(void)
ImageList_Destroy(himl1);
ImageList_Destroy(himl2);
- DeleteObject(hicon1);
+ DestroyIcon(hicon1);
DestroyWindow(hwnd);
}
More information about the wine-cvs
mailing list