From de0874b77b616e7482982c6e05c3d6b134d2321e Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Miko=C5=82aj_Zalewski?= Date: Thu, 6 Mar 2008 22:06:21 +0100 Subject: [PATCH] comctl32: rebar: fir 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 */ -- 1.4.4.2