From 018c394c5200ef468d6bb721aa6b467d9fdffd50 Mon Sep 17 00:00:00 2001 From: Juan Pablo Ugarte Date: Thu, 1 May 2014 19:54:10 -0300 Subject: [PATCH] GtkGrid: gtk_grid_get_size_for_size() do not dereference a NULL pointer. --- gtk/gtkgrid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index 69d29f4fcc..5c93571ccf 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -1459,7 +1459,7 @@ gtk_grid_get_size_for_size (GtkGrid *grid, { GtkGridRequest request; GtkGridLines *lines; - gint min_size; + gint min_size, nat_size; if (minimum) *minimum = 0; @@ -1486,7 +1486,7 @@ gtk_grid_get_size_for_size (GtkGrid *grid, memset (lines->lines, 0, (lines->max - lines->min) * sizeof (GtkGridLine)); gtk_grid_request_run (&request, 1 - orientation, FALSE); - gtk_grid_request_sum (&request, 1 - orientation, &min_size, NULL, NULL, NULL); + gtk_grid_request_sum (&request, 1 - orientation, &min_size, &nat_size, NULL, NULL); gtk_grid_request_allocate (&request, 1 - orientation, MAX (size, min_size)); gtk_grid_request_run (&request, orientation, TRUE);