comctl32: fix imagelist regression from "comctl32: Remove Nx1 assumptions in ImageList_Read"

Peter Oberndorfer kumbayo84 at arcor.de
Sun Dec 10 09:57:06 CST 2006


The patch comctl32: Remove Nx1 assumptions in ImageList_Read (e74b0ee9102470d1b866e94c54527b34806cf876)
would produce black images on the toolbar of IDA Pro Demo after clicking one of the listviews on the right


Changelog:
comctl32: fix imagelist regression from "comctl32: Remove Nx1 assumptions in ImageList_Read"
remove unused HBITMAP hbmColor
-------------- next part --------------
From c0d726af60cf4cecbc9e4fd0d20cbbd5f650c6da Mon Sep 17 00:00:00 2001
From: Peter Oberndorfer <kumbayo84 at arcor.de>
Date: Sun, 10 Dec 2006 14:18:41 +0100
Subject: [PATCH] comctl32: fix imagelist regression from "comctl32: Remove Nx1 assumptions in ImageList_Read"

remove unused HBITMAP hbmColor
---
 dlls/comctl32/imagelist.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index 76ee812..4e93f94 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -1983,7 +1983,6 @@ HIMAGELIST WINAPI ImageList_Read (LPSTRE
 {
     ILHEAD	ilHead;
     HIMAGELIST	himl;
-    HBITMAP	hbmColor=0;
     int		i;
 
     TRACE("%p\n", pstm);
@@ -1997,7 +1996,6 @@ HIMAGELIST WINAPI ImageList_Read (LPSTRE
 
     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)) {
@@ -2006,14 +2004,10 @@ HIMAGELIST WINAPI ImageList_Read (LPSTRE
     }
     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;
 
-- 
1.4.4



More information about the wine-patches mailing list