From 8d74ef1030faf286c80e2c28e13eb4dcdf0d791e Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 13 Nov 2002 19:39:09 +0000 Subject: [PATCH] Check the return value of ImageList_GetImageInfo before adjusting the size. --- dlls/comctl32/comboex.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index a3c7c1ccdb8..883329c03cb 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -400,8 +400,7 @@ static void COMBOEX_ReSize (COMBOEX_INFO *infoPtr) COMBOEX_GetComboFontSize (infoPtr, &mysize); cy = mysize.cy + CBE_EXTRA; - if (infoPtr->himl) { - ImageList_GetImageInfo(infoPtr->himl, 0, &iinfo); + if (infoPtr->himl && ImageList_GetImageInfo(infoPtr->himl, 0, &iinfo)) { cy = max (iinfo.rcImage.bottom - iinfo.rcImage.top, cy); TRACE("upgraded height due to image: height=%d\n", cy); }