Commit 4ef24426 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

comctl32: Don't free user32 objects with a gdi32 function in imagelist test.

Use DestroyIcon for releasing the resources associated with created icons.
parent 06f0e723
......@@ -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);
}
......
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