box: Initialize size arrays to 0

Thats the right thing to do.

https://bugzilla.gnome.org/show_bug.cgi?id=773814
This commit is contained in:
Timm Bäder 2017-03-30 07:02:00 +00:00 committed by Matthias Clasen
parent dfe993ff1d
commit f3f71ef0ac

View File

@ -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 */