From d184027a985f1b5fe594afdd5f6da3deea30ff0b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 17 Jul 2015 18:38:30 -0400 Subject: [PATCH] GtkGrid: Add a few NULL checks Coverity complained about these. --- gtk/gtkgrid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index ce4a7dca43..665381d26f 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -1126,8 +1126,11 @@ gtk_grid_request_sum (GtkGridRequest *request, nat -= linedata->spacing; } - *minimum = min; - *natural = nat; + if (minimum) + *minimum = min; + + if (natural) + *natural = nat; } /* Computes minimum and natural fields of lines.