Index: imagelist.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/imagelist.c,v retrieving revision 1.53 diff -u -r1.53 imagelist.c --- imagelist.c 31 May 2002 23:25:44 -0000 1.53 +++ imagelist.c 15 Jul 2002 19:36:55 -0000 @@ -2292,6 +2292,8 @@ HDC hdcSrc, hdcDst; INT cxNew, nCount; + TRACE("(himl=%p i=%d)\n", himl, i); + if (himl == NULL) { ERR("Invalid image list handle!\n"); return FALSE; @@ -2302,14 +2304,13 @@ return FALSE; } - if (himl->cCurImage == 0) { - ERR("image list is already empty!\n"); - return FALSE; - } - if (i == -1) { /* remove all */ - TRACE("remove all!\n"); + if (himl->cCurImage == 0) { + /* remove all on empty ImageList is allowed */ + TRACE("remove all on empty ImageList!\n"); + return TRUE; + } himl->cMaxImage = himl->cInitial + himl->cGrow; himl->cCurImage = 0;