aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/ephy-dbus.c26
2 files changed, 24 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 3770b4944..1b29555e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2006-01-22 Crispin Flowerday <gnome@flowerday.cx>
+ * src/ephy-dbus.c (ephy_dbus_shutdown):
+
+ Add guards to avoid crashing on exit if system bus
+ isn't running. Fixes bug #327845
+
+2006-01-22 Crispin Flowerday <gnome@flowerday.cx>
+
* embed/ephy-permission-manager.c:
(ephy_permission_manager_add_permission),
(ephy_permission_manager_remove_permission),
diff --git a/src/ephy-dbus.c b/src/ephy-dbus.c
index cdef34752..61367f7a5 100644
--- a/src/ephy-dbus.c
+++ b/src/ephy-dbus.c
@@ -349,15 +349,23 @@ ephy_dbus_shutdown (EphyDbus *dbus)
dbus->priv->reconnect_timeout_id = 0;
}
- dbus_connection_remove_filter
- (dbus_g_connection_get_connection (dbus->priv->session_bus),
- session_filter_func, dbus);
- ephy_dbus_disconnect_bus (dbus->priv->session_bus);
-
- dbus_connection_remove_filter
- (dbus_g_connection_get_connection (dbus->priv->system_bus),
- system_filter_func, dbus);
- ephy_dbus_disconnect_bus (dbus->priv->system_bus);
+ if (dbus->priv->session_bus)
+ {
+ dbus_connection_remove_filter
+ (dbus_g_connection_get_connection (dbus->priv->session_bus),
+ session_filter_func, dbus);
+ ephy_dbus_disconnect_bus (dbus->priv->session_bus);
+ dbus->priv->session_bus = NULL;
+ }
+
+ if (dbus->priv->system_bus)
+ {
+ dbus_connection_remove_filter
+ (dbus_g_connection_get_connection (dbus->priv->system_bus),
+ system_filter_func, dbus);
+ ephy_dbus_disconnect_bus (dbus->priv->system_bus);
+ dbus->priv->system_bus = NULL;
+ }
}
DBusGConnection *