[pygobject] Add error-checking for the case where _arg_cache_new() fails
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Add error-checking for the case where _arg_cache_new() fails
- Date: Wed, 11 Jul 2012 15:11:41 +0000 (UTC)
commit b4bef457c2d0ca6899e06a021f1f06252a37e326
Author: Dave Malcolm <dmalcolm redhat com>
Date: Wed Jul 11 08:21:27 2012 +0200
Add error-checking for the case where _arg_cache_new() fails
This can happen when a typelib and its underlying library are out-of-sync. This
converts the segfault into a more helpful traceback.
https://bugzilla.gnome.org/show_bug.cgi?id=678914
gi/pygi-cache.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c
index 5083417..5d496d5 100644
--- a/gi/pygi-cache.c
+++ b/gi/pygi-cache.c
@@ -1277,6 +1277,8 @@ _args_cache_generate (GICallableInfo *callable_info,
return_direction,
-1,
-1);
+ if (return_cache == NULL)
+ return FALSE;
return_cache->is_skipped = g_callable_info_skip_return (callable_info);
callable_cache->return_cache = return_cache;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]