Commit f3f71ef0 authored by Timm Bäder's avatar Timm Bäder 👎 Committed by Matthias Clasen

box: Initialize size arrays to 0

Thats the right thing to do.

https://bugzilla.gnome.org/show_bug.cgi?id=773814
parent dfe993ff
......@@ -521,6 +521,7 @@ gtk_box_size_allocate_no_center (GtkWidget *widget,
direction = gtk_widget_get_direction (widget);
sizes = g_newa (GtkRequestedSize, nvis_children);
memset (sizes, 0, nvis_children * sizeof (GtkRequestedSize));
if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
size = allocation->width - (nvis_children - 1) * private->spacing;
......@@ -1220,7 +1221,7 @@ gtk_box_size_allocate (GtkWidget *widget,
allocation,
gtk_widget_get_allocated_baseline (widget),
&clip);
gtk_widget_set_clip (widget, &clip);
}
......@@ -1763,6 +1764,7 @@ gtk_box_compute_size_for_opposing_orientation (GtkBox *box,
return;
sizes = g_newa (GtkRequestedSize, nvis_children);
memset (sizes, 0, nvis_children * sizeof (GtkRequestedSize));
size = avail_size - (nvis_children - 1) * private->spacing;
/* Retrieve desired size for visible children */
......
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