Commit d84cad6a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/imagelist: Fail to create imagelist with zero or negative image dimensions.

parent 66c9a73d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment