[PATCH 2/2] Release Imagelist handles when no needed anymore

Nikolay Sivov bunglehead at gmail.com
Sat Oct 24 10:33:36 CDT 2009


---
 dlls/comctl32/tests/toolbar.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c
index 3b3708b..41f4f2d 100644
--- a/dlls/comctl32/tests/toolbar.c
+++ b/dlls/comctl32/tests/toolbar.c
@@ -373,6 +373,8 @@ static void test_add_bitmap(void)
     addbmp.hInst = HINST_COMMCTRL;
     addbmp.nID = IDB_STD_SMALL_COLOR;
     rebuild_toolbar(&hToolbar);
+    ImageList_Destroy(himl);
+
     ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n");
     CHECK_IMAGELIST(15, 16, 16);
     compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(23, 22), "%x");
@@ -980,6 +982,7 @@ static void test_sizes(void)
 
     rebuild_toolbar(&hToolbar);
     ImageList_Destroy(himl);
+    ImageList_Destroy(himl2);
 
     SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]);
     ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(27, 39), "Unexpected button size\n");
-- 
1.5.6.5


--=-iqiQTRbu63ipwHtbIUPS--




More information about the wine-patches mailing list