[nautilus] application: clear dbus_manager and search_provider after unregistering



commit ea92d8622e9c153678b10955600ea0189764e61b
Author: Ernestas Kulik <ernestask src gnome org>
Date:   Sun Oct 23 17:54:46 2016 +0300

    application: clear dbus_manager and search_provider after unregistering
    
    The search provider gets unregistered twice when trying to run Nautilus
    with a primary instance active, resulting in the infamous warning:
    
    GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion
    'interface_->priv->connections != NULL' failed
    
    The fix is clearing both dbus_manager and search_provider in
    nautilus_application_dbus_unregister() as opposed to during
    finalization.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=773383

 src/nautilus-application.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index b80c60a..fa07dda 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -604,9 +604,7 @@ nautilus_application_finalize (GObject *object)
     g_clear_object (&priv->progress_handler);
     g_clear_object (&priv->bookmark_list);
 
-    g_clear_object (&priv->dbus_manager);
     g_clear_object (&priv->fdb_manager);
-    g_clear_object (&priv->search_provider);
 
     g_list_free (priv->windows);
 
@@ -1299,11 +1297,13 @@ nautilus_application_dbus_unregister (GApplication    *app,
     if (priv->dbus_manager)
     {
         nautilus_dbus_manager_unregister (priv->dbus_manager);
+        g_clear_object (&priv->dbus_manager);
     }
 
     if (priv->search_provider)
     {
         nautilus_shell_search_provider_unregister (priv->search_provider);
+        g_clear_object (&priv->search_provider);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]