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

This commit is contained in:
Peter Oberndorfer 2006-12-10 16:57:06 +01:00 committed by Alexandre Julliard
parent f0280cbd1e
commit d119fd44fe
1 changed files with 0 additions and 6 deletions

View File

@ -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;