Nikolay Sivov : comctl32/rebar: Avoid empty band range when changing layout .

Alexandre Julliard julliard at winehq.org
Thu Dec 24 10:27:18 CST 2009


Module: wine
Branch: master
Commit: 02c06f0d6662d5490761c7c43418b34e91228e95
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=02c06f0d6662d5490761c7c43418b34e91228e95

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Thu Dec 24 00:54:29 2009 +0300

comctl32/rebar: Avoid empty band range when changing layout.

---

 dlls/comctl32/rebar.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 90e79d5..021bc16 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);




More information about the wine-cvs mailing list