Commit bb1d9aba authored by Matthias Clasen's avatar Matthias Clasen

Fix natural/min widht calculations for empty grids

https://bugzilla.gnome.org/show_bug.cgi?id=660139
parent 6b510f48
......@@ -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++)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment