summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark McLoughlin <mark@skynet.ie>2005-02-10 16:16:39 +0000
committerMark McLoughlin <markmc@src.gnome.org>2005-02-10 16:16:39 +0000
commitfc037ac50f6e647a2d373d6152ff57f9fd3467c9 (patch)
tree7c0f602aaf57b7dd224980ca7f7a3e23b2c62d90
parentfa8fde62639f0237cd39f4c06f3ff4e8c2ff5158 (diff)
downloadpygobject-fc037ac50f6e647a2d373d6152ff57f9fd3467c9.tar.gz
pygobject-fc037ac50f6e647a2d373d6152ff57f9fd3467c9.tar.xz
pygobject-fc037ac50f6e647a2d373d6152ff57f9fd3467c9.zip
don't pass a NULL value to PyThread_set_key_value() - causes an assertion
2005-02-10 Mark McLoughlin <mark@skynet.ie> * gobject/pygmainloop.c: (pyg_restore_current_main_loop): don't pass a NULL value to PyThread_set_key_value() - causes an assertion failure with python 2.4.
-rw-r--r--gobject/pygmainloop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gobject/pygmainloop.c b/gobject/pygmainloop.c
index 2c65cac..90357f2 100644
--- a/gobject/pygmainloop.c
+++ b/gobject/pygmainloop.c
@@ -89,7 +89,8 @@ pyg_restore_current_main_loop (GMainLoop *main_loop)
if (prev != NULL)
g_main_loop_unref(prev);
PyThread_delete_key_value(pyg_current_main_loop_key);
- PyThread_set_key_value(pyg_current_main_loop_key, main_loop);
+ if (main_loop != NULL)
+ PyThread_set_key_value(pyg_current_main_loop_key, main_loop);
}
static inline GMainLoop *