listbox: fix a segfault

Don't dereference a NULL pointer.
This commit is contained in:
Cosimo Cecchi 2014-05-01 19:46:47 +02:00
parent 7f60cab47d
commit 24fd96d837

View File

@ -2281,8 +2281,8 @@ gtk_list_box_get_preferred_height (GtkWidget *widget,
gint *minimum_height,
gint *natural_height)
{
gint natural_width;
gtk_list_box_get_preferred_width (widget, NULL, &natural_width);
gint min_width, natural_width;
gtk_list_box_get_preferred_width (widget, &min_width, &natural_width);
gtk_list_box_get_preferred_height_for_width (widget, natural_width,
minimum_height, natural_height);
}
@ -2971,9 +2971,9 @@ gtk_list_box_row_get_preferred_height (GtkWidget *widget,
gint *minimum_height,
gint *natural_height)
{
gint natural_width;
gint min_width, natural_width;
gtk_list_box_row_get_preferred_width (widget, NULL, &natural_width);
gtk_list_box_row_get_preferred_width (widget, &min_width, &natural_width);
gtk_list_box_row_get_preferred_height_for_width (widget, natural_width,
minimum_height, natural_height);
}