diff options
-rw-r--r-- | bus/test.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -133,6 +133,9 @@ bus_setup_debug_client (DBusConnection *connection) { dbus_bool_t retval; + /* it had better not be there already */ + _dbus_assert (_dbus_list_find_last (&clients, connection) == NULL); + if (!dbus_connection_add_filter (connection, client_disconnect_filter, NULL, NULL)) @@ -179,7 +182,9 @@ bus_setup_debug_client (DBusConnection *connection) dbus_connection_set_timeout_functions (connection, NULL, NULL, NULL, NULL, NULL); - _dbus_list_remove_last (&clients, connection); + /* we failed to add it (the last thing we do) or never tried, so it + * had better not be there */ + _dbus_assert (_dbus_list_find_last (&clients, connection) == NULL); if (clients == NULL) { |