[gtk+] GtkGrid: Add a few NULL checks



commit e215db6da21fc7c54f49b247afabc06a18d60513
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jul 17 18:38:30 2015 -0400

    GtkGrid: Add a few NULL checks
    
    Coverity complained about these.

 gtk/gtkgrid.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index 1b821b2..b12af75 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -1127,8 +1127,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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]