diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/ephy-dbus.c | 26 |
2 files changed, 24 insertions, 9 deletions
@@ -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 * |