forked from AuroraMiddleware/gtk
flowbox: Avoid a crash in measure()
When the children request a height of zero, the flowbox measure() function was happily dividing by that zero, leading to badness.
This commit is contained in:
parent
7915e998e2
commit
33011ccdff
@ -2075,6 +2075,8 @@ gtk_flow_box_measure (GtkWidget *widget,
|
||||
goto out_width;
|
||||
|
||||
get_max_item_size (box, GTK_ORIENTATION_VERTICAL, &min_item_height, &nat_item_height);
|
||||
if (nat_item_height <= 0)
|
||||
goto out_width;
|
||||
|
||||
/* By default flow at the natural item width */
|
||||
line_length = avail_size / (nat_item_height + priv->row_spacing);
|
||||
|
Loading…
Reference in New Issue
Block a user