aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-account-manager.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c
index c8cabdd0d..38f8c6085 100644
--- a/libempathy/empathy-account-manager.c
+++ b/libempathy/empathy-account-manager.c
@@ -139,10 +139,16 @@ connection_invalidated_cb (TpProxy *connection,
AccountData *data;
DEBUG ("Message: %s", message);
+
account = g_hash_table_lookup (priv->connections, connection);
+ g_assert (account != NULL);
+
data = g_hash_table_lookup (priv->accounts, account);
+ g_assert (data != NULL);
+
g_object_unref (data->connection);
data->connection = NULL;
+
g_hash_table_remove (priv->connections, connection);
}