[pygobject] [gi] Fix crash: check return value of _invoke_state_init_from_callable_cache() before continuing.



commit aa820d6ce2fee83e61e3e9de7c6b7d2452e2847d
Author: Laszlo Pandy <lpandy src gnome org>
Date:   Mon Aug 8 01:58:10 2011 +0200

    [gi] Fix crash: check return value of _invoke_state_init_from_callable_cache() before continuing.

 gi/pygi-invoke.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gi/pygi-invoke.c b/gi/pygi-invoke.c
index 8861ab3..2a41add 100644
--- a/gi/pygi-invoke.c
+++ b/gi/pygi-invoke.c
@@ -450,7 +450,9 @@ _wrap_g_callable_info_invoke (PyGIBaseInfo *self,
             return NULL;
     }
 
-    _invoke_state_init_from_callable_cache (&state, self->cache, py_args, kwargs);
+    if (!_invoke_state_init_from_callable_cache (&state, self->cache, py_args, kwargs))
+        goto err;
+
     if (!_invoke_marshal_in_args (&state, self->cache))
         goto err;
 



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