[libpeas] Fix segfault if pygobject could not be initialized
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Fix segfault if pygobject could not be initialized
- Date: Sat, 26 Mar 2011 18:55:26 +0000 (UTC)
commit 95c8d02ce8480c53bd1c21c53e656f52a38b465e
Author: Garrett Regier <alias301 gmail com>
Date: Fri Mar 25 08:17:51 2011 -0700
Fix segfault if pygobject could not be initialized
loaders/python/peas-plugin-loader-python.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 54b39cd..eb59ffa 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -323,11 +323,14 @@ peas_python_shutdown (PeasPluginLoaderPython *loader)
loader->priv->idle_gc = 0;
}
- run_gc_protected ();
+ if (!loader->priv->init_failed)
+ run_gc_protected ();
if (loader->priv->must_finalize_python)
{
- pyg_gil_state_ensure ();
+ if (!loader->priv->init_failed)
+ pyg_gil_state_ensure ();
+
Py_Finalize ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]