Allow creation of empty imagelist.
This commit is contained in:
parent
31b47218c8
commit
251147741c
|
@ -896,6 +896,7 @@ ImageList_Create (INT cx, INT cy, UINT flags,
|
|||
|
||||
TRACE("Image: %d Bits per Pixel\n", himl->uBitsPixel);
|
||||
|
||||
if (himl->cMaxImage > 0) {
|
||||
himl->hbmImage =
|
||||
CreateBitmap (himl->cx * himl->cMaxImage, himl->cy,
|
||||
1, himl->uBitsPixel, NULL);
|
||||
|
@ -903,8 +904,11 @@ ImageList_Create (INT cx, INT cy, UINT flags,
|
|||
ERR("Error creating image bitmap!\n");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
himl->hbmImage = 0;
|
||||
|
||||
if (himl->flags & ILC_MASK) {
|
||||
if ( (himl->cMaxImage > 0) && (himl->flags & ILC_MASK)) {
|
||||
himl->hbmMask = CreateBitmap (himl->cx * himl->cMaxImage, himl->cy,
|
||||
1, 1, NULL);
|
||||
if (himl->hbmMask == 0) {
|
||||
|
|
Loading…
Reference in New Issue