flow-layout: Check for all positive values
authorMike Ruprecht <mike.ruprecht@collabora.co.uk>
Tue, 22 May 2012 13:25:19 +0000 (14:25 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 22 May 2012 13:25:19 +0000 (14:25 +0100)
commitee708d1cf8f2a74f34626e2da5b7b42a4d5cb0b7
treea1a9bb4157d139f06715644eebf1268db43b8a5d
parent403e1c7e708a7224a840dff6a6ed35722e049af8
flow-layout: Check for all positive values

When creating a FlowLayout container, setting a specific size on it, and
adding a child to it, as per the attached testcase, it crashes. The line
on the backtrace doesn't really make sense, but from looking over it, it
appears that it's probably because priv->line_natural is NULL. The
attached patch makes it so in this case, priv->line_natural is
allocated.

https://bugzilla.gnome.org/show_bug.cgi?id=676068

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
clutter/clutter-flow-layout.c