From d5325a0c46120b9737f66a20abfb265135921246 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 19 Jun 2012 07:33:40 -0400 Subject: [PATCH] ESourceRegistry: Use g_main_context_ref_thread_default(). Slightly more convenient than g_main_context_get_thread_default(), which requires checking for NULL before referencing the main context ourselves. --- libedataserver/e-source-registry.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libedataserver/e-source-registry.c b/libedataserver/e-source-registry.c index d07a7b8..361d0e2 100644 --- a/libedataserver/e-source-registry.c +++ b/libedataserver/e-source-registry.c @@ -1217,9 +1217,7 @@ e_source_registry_init (ESourceRegistry *registry) /* This is so the object manager thread can schedule signal * emissions on the thread-default context for this thread. */ - registry->priv->main_context = g_main_context_get_thread_default (); - if (registry->priv->main_context != NULL) - g_main_context_ref (registry->priv->main_context); + registry->priv->main_context = g_main_context_ref_thread_default (); /* D-Bus object path -> ESource */ registry->priv->object_path_table = -- 2.7.4