[pygobject] pyglib_error_check: Re-add missing NULL check



commit a41984780ee49dcf02c718ca1be87bba747472e5
Author: Martin Pitt <martin pitt ubuntu com>
Date:   Mon Feb 6 09:34:28 2012 +0100

    pyglib_error_check: Re-add missing NULL check
    
    Commit adcfe96d49b09bc accidentally dropped the check if *error is NULL, i. e.
    any error is actually set. Due to that, pyglib_error_check() always returned
    TRUE. Reintroduce the check.
    
    Thanks to Alberto Mardegan for spotting this!
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669415

 gi/_glib/pyglib.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gi/_glib/pyglib.c b/gi/_glib/pyglib.c
index a3d2ec3..40df53b 100644
--- a/gi/_glib/pyglib.c
+++ b/gi/_glib/pyglib.c
@@ -310,6 +310,8 @@ pyglib_error_check(GError **error)
     PyObject *exc_instance;
 
     g_return_val_if_fail(error != NULL, FALSE);
+    if (*error == NULL)
+	return FALSE;
 
     state = pyglib_gil_state_ensure();
 



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