[pygobject] closure: Check the out arg is not null. Fixes bug #651812



commit dff5961ba229c7c34bd7b0a18a446b56bbe39e3a
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed Jun 8 19:13:48 2011 +0200

    closure: Check the out arg is not null. Fixes bug #651812

 gi/pygi-closure.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c
index 56ddc8b..1ec6c66 100644
--- a/gi/pygi-closure.c
+++ b/gi/pygi-closure.c
@@ -35,6 +35,9 @@ _pygi_closure_assign_pyobj_to_out_argument (gpointer out_arg, PyObject *object,
     GIArgument arg = _pygi_argument_from_object (object, type_info, transfer);
     GITypeTag type_tag = g_type_info_get_tag (type_info);
 
+    if (out_arg == NULL)
+        return;
+
     switch (type_tag) {
         case GI_TYPE_TAG_BOOLEAN:
            *((gboolean *) out_arg) = arg.v_boolean;



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