diff options
author | Ray Strode <rstrode@redhat.com> | 2013-05-17 09:35:18 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2013-05-20 22:27:32 -0400 |
commit | fe6dd54d7b5300c1b025a95ed189d4222fd1432f (patch) | |
tree | 3fb9d571d79cfd69d7003512ebbcd99954e9025e | |
parent | c08e9a6a16b2fa953c6ee90b2a6adb618cba5942 (diff) | |
download | gdm-fe6dd54d7b5300c1b025a95ed189d4222fd1432f.tar.gz |
manager: don't try to unexport objects on system bus after it closes
When the main GDM manager object is finalized, it unexports any
exported DBus ObjectManager objects.
In many cases, the system bus is no longer around by the time the GDM
manager object is finalized. Unexporting an object when the the
bus connection is already closed will make GDBus blow an assertion
(since it's already been implicitly unexported by virtue of being
disconnected).
This commit changes the GDM manager object's finalize method to avoid
explicitly unexporting the objects in the above scenario.
https://bugzilla.gnome.org/show_bug.cgi?id=700523
-rw-r--r-- | daemon/gdm-manager.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index 6f5364e7..ce857cf8 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -1163,12 +1163,14 @@ gdm_manager_finalize (GObject *object) G_CALLBACK (on_display_removed), manager); - gdm_display_store_foreach (manager->priv->display_store, - (GdmDisplayStoreFunc)unexport_display, - manager); - gdm_display_store_clear (manager->priv->display_store); + if (!g_dbus_connection_is_closed (manager->priv->connection)) { + gdm_display_store_foreach (manager->priv->display_store, + (GdmDisplayStoreFunc)unexport_display, + manager); + g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (manager)); + } - g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (manager)); + gdm_display_store_clear (manager->priv->display_store); g_dbus_object_manager_server_set_connection (manager->priv->object_manager, NULL); |