summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2013-05-17 09:35:18 -0400
committerRay Strode <rstrode@redhat.com>2013-08-14 08:21:14 -0400
commite14840bbc70978174a4a66dd1e67d7444de5d5a6 (patch)
tree2bbac511faf4bc78111426b5ff5bfb43c6f56e79
parent4b842d17e9bcd138494f68c069c635b4ceb44545 (diff)
downloadgdm-e14840bbc70978174a4a66dd1e67d7444de5d5a6.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.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 74c6888f..17e8ca52 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1160,12 +1160,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);