comctl32/imagelist: Fail to create imagelist with zero or negative image dimensions.
This commit is contained in:
parent
66c9a73db5
commit
d84cad6a06
|
@ -694,6 +694,8 @@ ImageList_Create (INT cx, INT cy, UINT flags,
|
|||
|
||||
TRACE("(%d %d 0x%x %d %d)\n", cx, cy, flags, cInitial, cGrow);
|
||||
|
||||
if (cx <= 0 || cy <= 0) return NULL;
|
||||
|
||||
/* Create the IImageList interface for the image list */
|
||||
if (FAILED(ImageListImpl_CreateInstance(NULL, &IID_IImageList, (void **)&himl)))
|
||||
return NULL;
|
||||
|
|
|
@ -1754,7 +1754,6 @@ static void test_create(void)
|
|||
{
|
||||
HIMAGELIST himl;
|
||||
|
||||
todo_wine {
|
||||
/* list with zero or negative image dimensions */
|
||||
himl = ImageList_Create(0, 0, ILC_COLOR16, 0, 3);
|
||||
ok(himl == NULL, "got %p\n", himl);
|
||||
|
@ -1772,8 +1771,6 @@ todo_wine {
|
|||
ok(himl == NULL, "got %p\n", himl);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
START_TEST(imagelist)
|
||||
{
|
||||
ULONG_PTR ctx_cookie;
|
||||
|
|
Loading…
Reference in New Issue