From 02c06f0d6662d5490761c7c43418b34e91228e95 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 24 Dec 2009 00:54:29 +0300 Subject: [PATCH] comctl32/rebar: Avoid empty band range when changing layout. --- dlls/comctl32/rebar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 90e79d59fee..021bc16bf2e 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -1377,7 +1377,8 @@ REBAR_Layout(REBAR_INFO *infoPtr) xMin += lpBand->cxMinBand; } - REBAR_LayoutRow(infoPtr, rowstart, infoPtr->uNumBands, adjcx, &row, &yPos); + if (rowstart < infoPtr->uNumBands) + REBAR_LayoutRow(infoPtr, rowstart, infoPtr->uNumBands, adjcx, &row, &yPos); if (!(infoPtr->dwStyle & RBS_VARHEIGHT)) yPos = REBAR_SetBandsHeight(infoPtr, first_visible(infoPtr), infoPtr->uNumBands, 0); -- 2.11.4.GIT