Skip to content
Snippets Groups Projects
Commit b79fc165 authored by Mike Hearn's avatar Mike Hearn Committed by Alexandre Julliard
Browse files

Avoid division by zero when the imagelist is created with a width of

zero (ie no images).
parent 919bd785
No related branches found
No related tags found
No related merge requests found
......@@ -284,7 +284,10 @@ ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
if (!GetObjectA (hBitmap, sizeof(BITMAP), &bmp))
return -1;
nImageCount = bmp.bmWidth / himl->cx;
if (himl->cx > 0)
nImageCount = bmp.bmWidth / himl->cx;
else
nImageCount = 0;
IMAGELIST_InternalExpandBitmaps (himl, nImageCount, bmp.bmWidth, bmp.bmHeight);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment