tinus <o112w8r02(a)sneakemail.com>
Properly allow removing toolbar bitmaps by changing it into 0.
Modified: trunk/reactos/lib/comctl32/toolbar.c
_____
Modified: trunk/reactos/lib/comctl32/toolbar.c
--- trunk/reactos/lib/comctl32/toolbar.c 2005-01-25 05:38:01 UTC
(rev 13268)
+++ trunk/reactos/lib/comctl32/toolbar.c 2005-01-25 08:32:47 UTC
(rev 13269)
@@ -4269,7 +4269,7 @@
LPTBREPLACEBITMAP lpReplace = (LPTBREPLACEBITMAP) lParam;
HBITMAP hBitmap;
int i = 0, nOldButtons = 0, pos = 0;
- int nOldBitmaps, nNewBitmaps;
+ int nOldBitmaps, nNewBitmaps = 0;
HIMAGELIST himlDef = 0;
TRACE("hInstOld %p nIDOld %x hInstNew %p nIDNew %x nButtons %x\n",
@@ -4322,6 +4322,7 @@
for (i = pos + nOldBitmaps - 1; i >= pos; i--)
ImageList_Remove(himlDef, i);
+ if (hBitmap)
{
BITMAP bmp;
HBITMAP hOldBitmapBitmap, hOldBitmapLoad, hbmLoad;
Show replies by date