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) ...@@ -694,6 +694,7 @@ ImageList_Destroy (HIMAGELIST himl)
if (himl->hbrBlend50) if (himl->hbrBlend50)
DeleteObject (himl->hbrBlend50); DeleteObject (himl->hbrBlend50);
ZeroMemory(himl, sizeof(*himl));
COMCTL32_Free (himl); COMCTL32_Free (himl);
return TRUE; return TRUE;
...@@ -1223,9 +1224,9 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) ...@@ -1223,9 +1224,9 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
cleanup: cleanup:
DeleteObject(hBlendMaskBmp); DeleteObject(hBlendMaskBmp);
DeleteObject(hImageBmp); DeleteObject(hImageBmp);
DeleteObject(hImageDC); DeleteDC(hImageDC);
DeleteObject(hImageListDC); DeleteDC(hImageListDC);
DeleteObject(hMaskListDC); DeleteDC(hMaskListDC);
return bResult; 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