comctl32/imagelist: Correctly resize the alpha flags when clearing the image list.

This commit is contained in:
Alexandre Julliard 2014-05-01 17:19:54 +02:00
parent d1469144e9
commit 1dd04884d7
1 changed files with 6 additions and 0 deletions

View File

@ -2376,6 +2376,12 @@ ImageList_Remove (HIMAGELIST himl, INT i)
for (nCount = 0; nCount < MAX_OVERLAYIMAGE; nCount++)
himl->nOvlIdx[nCount] = -1;
if (himl->has_alpha)
{
HeapFree( GetProcessHeap(), 0, himl->has_alpha );
himl->has_alpha = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, himl->cMaxImage );
}
hbmNewImage = ImageList_CreateImage(himl->hdcImage, himl, himl->cMaxImage);
SelectObject (himl->hdcImage, hbmNewImage);
DeleteObject (himl->hbmImage);