Commit 0fe326c4 authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Use DeleteDC instead of DeleteObject to free HDCs (spotted by Dietrich

Teickner <Dietrich_Teickner@t-online.de>). Clear the imagelist structure on deletion, as some stupid apps free imagelists multiple times.
parent 27faf02e
......@@ -694,6 +694,7 @@ ImageList_Destroy (HIMAGELIST himl)
if (himl->hbrBlend50)
DeleteObject (himl->hbrBlend50);
ZeroMemory(himl, sizeof(*himl));
COMCTL32_Free (himl);
return TRUE;
......@@ -1223,9 +1224,9 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
cleanup:
DeleteObject(hBlendMaskBmp);
DeleteObject(hImageBmp);
DeleteObject(hImageDC);
DeleteObject(hImageListDC);
DeleteObject(hMaskListDC);
DeleteDC(hImageDC);
DeleteDC(hImageListDC);
DeleteDC(hMaskListDC);
return bResult;
}
......
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