Module: wine Branch: master Commit: d3608cf4b2e08c843f2b914cbd8eeeea8510334e URL: http://source.winehq.org/git/wine.git/?a=commit;h=d3608cf4b2e08c843f2b914cbd...
Author: Mikołaj Zalewski mikolaj@zalewski.pl Date: Thu Mar 6 22:06:21 2008 +0100
comctl32: rebar: Fix SizeToHeight when no bands visible.
---
dlls/comctl32/rebar.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 9a3f8d5..f1f823a 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -1442,6 +1442,9 @@ REBAR_SizeToHeight(REBAR_INFO *infoPtr, int height) UINT uNumRows = infoPtr->uNumRows; int i;
+ if (uNumRows == 0) /* avoid division by 0 */ + return; + /* That's not exactly what Windows does but should be similar */
/* Pass one: break-up/glue rows */