diff options
author | Johan Dahlin <johan@gnome.org> | 2008-08-06 08:18:56 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-08-06 08:18:56 +0000 |
commit | 6f9ecc1cd9cc1498ffac79e1271b831a9be6b364 (patch) | |
tree | 71fd56ebbf410af71f15196387a107b5162024f9 /glib | |
parent | a93bb251501bdef03b6ac1f7fe32c2ee76346acb (diff) | |
download | pygobject-6f9ecc1cd9cc1498ffac79e1271b831a9be6b364.tar.gz pygobject-6f9ecc1cd9cc1498ffac79e1271b831a9be6b364.tar.xz pygobject-6f9ecc1cd9cc1498ffac79e1271b831a9be6b364.zip |
return in case of error instead of trying to access the internal types.
2008-08-06 Johan Dahlin <johan@gnome.org>
* glib/pyglib.c (pyglib_init):
return in case of error instead of trying to access the internal
types.
svn path=/trunk/; revision=926
Diffstat (limited to 'glib')
-rw-r--r-- | glib/pyglib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/glib/pyglib.c b/glib/pyglib.c index 3dd05a4..de8cbf9 100644 --- a/glib/pyglib.c +++ b/glib/pyglib.c @@ -63,9 +63,11 @@ pyglib_init(void) "could not import glib (error was: %s)", _PyUnicode_AsString(py_orig_exc)); Py_DECREF(py_orig_exc); - } else + } else { PyErr_SetString(PyExc_ImportError, "could not import glib (no error given)"); + } + return; } cobject = PyObject_GetAttrString(glib, "_PyGLib_API"); @@ -75,6 +77,7 @@ pyglib_init(void) PyErr_SetString(PyExc_ImportError, "could not import glib (could not find _PyGLib_API object)"); Py_DECREF(glib); + return; } _PyGMainContext_Type = (PyTypeObject*)PyObject_GetAttrString(glib, "MainContext"); |