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

This commit is contained in:
Nikolay Sivov 2010-08-19 10:20:11 +04:00 committed by Alexandre Julliard
parent 66c9a73db5
commit d84cad6a06
2 changed files with 2 additions and 3 deletions

View File

@ -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;

View File

@ -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;