diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 9a3f8d5f1c8..f1f823a17fe 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 */