Commit 57577fb2 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/header: Don't leak Imagelist handle.

parent e72ed1c4
......@@ -954,7 +954,7 @@ static void test_hdm_sethotdivider(HWND hParent)
static void test_hdm_imageMessages(HWND hParent)
{
HIMAGELIST hImageList = ImageList_Create (4, 4, 0, 1, 0);
HIMAGELIST hImageListRetVal;
HIMAGELIST hIml;
HWND hChild;
flush_sequences(sequences, NUM_MSG_SEQUENCES);
......@@ -964,14 +964,15 @@ static void test_hdm_imageMessages(HWND hParent)
flush_sequences(sequences, NUM_MSG_SEQUENCES);
hImageListRetVal = (HIMAGELIST) SendMessage(hChild, HDM_SETIMAGELIST, 0, (LPARAM) hImageList);
ok(hImageListRetVal == NULL, "Expected NULL, got %p\n", hImageListRetVal);
hIml = (HIMAGELIST) SendMessage(hChild, HDM_SETIMAGELIST, 0, (LPARAM) hImageList);
ok(hIml == NULL, "Expected NULL, got %p\n", hIml);
hImageListRetVal = (HIMAGELIST) SendMessage(hChild, HDM_GETIMAGELIST, 0, 0);
ok(hImageListRetVal != NULL, "Expected non-NULL handle, got %p\n", hImageListRetVal);
hIml = (HIMAGELIST) SendMessage(hChild, HDM_GETIMAGELIST, 0, 0);
ok(hIml != NULL, "Expected non-NULL handle, got %p\n", hIml);
hImageListRetVal = (HIMAGELIST) SendMessage(hChild, HDM_CREATEDRAGIMAGE, 0, 0);
ok(hImageListRetVal != NULL, "Expected non-NULL handle, got %p\n", hImageListRetVal);
hIml = (HIMAGELIST) SendMessage(hChild, HDM_CREATEDRAGIMAGE, 0, 0);
ok(hIml != NULL, "Expected non-NULL handle, got %p\n", hIml);
ImageList_Destroy(hIml);
ok_sequence(sequences, HEADER_SEQ_INDEX, imageMessages_seq, "imageMessages sequence testing", FALSE);
......
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