From fc037ac50f6e647a2d373d6152ff57f9fd3467c9 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 10 Feb 2005 16:16:39 +0000 Subject: don't pass a NULL value to PyThread_set_key_value() - causes an assertion 2005-02-10 Mark McLoughlin * 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. --- gobject/pygmainloop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 * -- cgit