[pygobject/invoke-rewrite] [gi] return NULL if out_marshaller fails
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [pygobject/invoke-rewrite] [gi] return NULL if out_marshaller fails
- Date: Wed, 19 Jan 2011 19:08:23 +0000 (UTC)
commit 8efd14c87b35072cdd039bf223f8ced8f51be9bb
Author: John (J5) Palmieri <johnp redhat com>
Date:   Wed Jan 19 14:08:03 2011 -0500
    [gi] return NULL if out_marshaller fails
 gi/pygi-invoke.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gi/pygi-invoke.c b/gi/pygi-invoke.c
index 00381e9..3414afd 100644
--- a/gi/pygi-invoke.c
+++ b/gi/pygi-invoke.c
@@ -1042,6 +1042,8 @@ _invoke_marshal_out_args(PyGIInvokeState *state, PyGIFunctionCache *cache)
                                                         cache,
                                                         cache->return_cache,
                                                         &state->return_arg);
+        if (py_return == NULL)
+            return NULL;
 
         if (cache->return_cache->type_tag != GI_TYPE_TAG_VOID) {
             total_out_args++;
@@ -1076,6 +1078,9 @@ _invoke_marshal_out_args(PyGIInvokeState *state, PyGIFunctionCache *cache)
                                                          arg_cache,
                                                          &(state->out_values[out_cache_index]));
 
+            if (py_obj == NULL)
+                return NULL;
+
             PyTuple_SET_ITEM(py_out, py_arg_index, py_obj);
             cache_item = cache_item->next;
         }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]