diff options
Diffstat (limited to 'gobject/pygmainloop.c')
-rw-r--r-- | gobject/pygmainloop.c | 3 |
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 * |