Commit d119fd44 authored by Peter Oberndorfer's avatar Peter Oberndorfer Committed by Alexandre Julliard

comctl32: Fix imagelist regression from "comctl32: Remove Nx1 assumptions in ImageList_Read".

parent f0280cbd
......@@ -1980,7 +1980,6 @@ HIMAGELIST WINAPI ImageList_Read (LPSTREAM pstm)
{
ILHEAD ilHead;
HIMAGELIST himl;
HBITMAP hbmColor=0;
int i;
TRACE("%p\n", pstm);
......@@ -1994,7 +1993,6 @@ HIMAGELIST WINAPI ImageList_Read (LPSTREAM pstm)
himl = ImageList_Create(ilHead.cx, ilHead.cy, ilHead.flags, ilHead.cCurImage, ilHead.cMaxImage);
if (!himl) {
DeleteObject(hbmColor);
return NULL;
}
if (!_read_bitmap(himl, himl->hdcImage, pstm, ilHead.flags & ~ILC_MASK)) {
......@@ -2003,14 +2001,10 @@ HIMAGELIST WINAPI ImageList_Read (LPSTREAM pstm)
}
if (ilHead.flags & ILC_MASK) {
if (!_read_bitmap(himl, himl->hdcMask, pstm, 0)) {
DeleteObject(hbmColor);
return NULL;
}
}
SelectObject(himl->hdcImage, hbmColor);
DeleteObject(himl->hbmImage);
himl->hbmImage = hbmColor;
himl->cCurImage = ilHead.cCurImage;
himl->cMaxImage = ilHead.cMaxImage;
......
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