Fix natural/min widht calculations for empty grids

https://bugzilla.gnome.org/show_bug.cgi?id=660139
This commit is contained in:
Matthias Clasen 2011-10-21 16:23:03 -04:00
parent 6b510f4855
commit bb1d9aba86

View File

@ -927,8 +927,13 @@ gtk_grid_request_sum (GtkGridRequest *request,
linedata = &priv->linedata[orientation];
lines = &request->lines[orientation];
min = (nonempty - 1) * linedata->spacing;
nat = (nonempty - 1) * linedata->spacing;
min = 0;
nat = 0;
if (nonempty > 0)
{
min = (nonempty - 1) * linedata->spacing;
nat = (nonempty - 1) * linedata->spacing;
}
for (i = 0; i < lines->max - lines->min; i++)
{