From 72ac5bdaef92bc3620ad2d2e4bb164d3c7d30861 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 25 Apr 2015 12:06:23 +0000 Subject: [PATCH] [UXTHEME] Apply Wine commit b12f73a by Mark Harmstone: Assume imagecount to be 1 if unspecified. svn path=/trunk/; revision=67406 --- reactos/dll/win32/uxtheme/draw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/dll/win32/uxtheme/draw.c b/reactos/dll/win32/uxtheme/draw.c index abc4153c1cf..d7081cc759e 100644 --- a/reactos/dll/win32/uxtheme/draw.c +++ b/reactos/dll/win32/uxtheme/draw.c @@ -241,6 +241,9 @@ static HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iState imagenum = max (min (imagecount, iStateId), 1) - 1; GetObjectW(*hBmp, sizeof(bmp), &bmp); + + if(imagecount < 1) imagecount = 1; + if(imagelayout == IL_VERTICAL) { int height = bmp.bmHeight/imagecount; bmpRect->left = 0; -- 2.17.1