uxtheme: Assume imagecount to be 1 if unspecified.
This commit is contained in:
parent
4c6427d080
commit
b12f73a591
|
@ -257,6 +257,9 @@ static HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iState
|
||||||
|
|
||||||
imagenum = max (min (imagecount, iStateId), 1) - 1;
|
imagenum = max (min (imagecount, iStateId), 1) - 1;
|
||||||
GetObjectW(*hBmp, sizeof(bmp), &bmp);
|
GetObjectW(*hBmp, sizeof(bmp), &bmp);
|
||||||
|
|
||||||
|
if(imagecount < 1) imagecount = 1;
|
||||||
|
|
||||||
if(imagelayout == IL_VERTICAL) {
|
if(imagelayout == IL_VERTICAL) {
|
||||||
int height = bmp.bmHeight/imagecount;
|
int height = bmp.bmHeight/imagecount;
|
||||||
bmpRect->left = 0;
|
bmpRect->left = 0;
|
||||||
|
|
Loading…
Reference in New Issue