aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorElliot Fairweather <elliot.fairweather@collabora.co.uk>2009-06-26 21:49:30 +0800
committerElliot Fairweather <elliot.fairweather@collabora.co.uk>2009-06-26 21:49:30 +0800
commit240b54dbfe75e1d24a7619cf22e2ffd3acbb6427 (patch)
treef19c3603be331e9112fc0e94d187a5162c0a1d29 /libempathy
parentae811044a107035a82cbba64951661494dd33e3a (diff)
downloadgsoc2013-empathy-240b54dbfe75e1d24a7619cf22e2ffd3acbb6427.tar
gsoc2013-empathy-240b54dbfe75e1d24a7619cf22e2ffd3acbb6427.tar.gz
gsoc2013-empathy-240b54dbfe75e1d24a7619cf22e2ffd3acbb6427.tar.bz2
gsoc2013-empathy-240b54dbfe75e1d24a7619cf22e2ffd3acbb6427.tar.lz
gsoc2013-empathy-240b54dbfe75e1d24a7619cf22e2ffd3acbb6427.tar.xz
gsoc2013-empathy-240b54dbfe75e1d24a7619cf22e2ffd3acbb6427.tar.zst
gsoc2013-empathy-240b54dbfe75e1d24a7619cf22e2ffd3acbb6427.zip
disconnect from invalidated signal before unreferencing connections
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-account-manager.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c
index dd0a72f59..ff9fd2525 100644
--- a/libempathy/empathy-account-manager.c
+++ b/libempathy/empathy-account-manager.c
@@ -505,12 +505,26 @@ empathy_account_manager_init (EmpathyAccountManager *manager)
}
static void
+account_manager_disconnect_foreach (gpointer key,
+ gpointer value,
+ gpointer user_data)
+{
+ TpConnection *connection = key;
+ EmpathyAccountManager *manager = user_data;
+
+ g_signal_handlers_disconnect_by_func (connection, connection_invalidated_cb,
+ manager);
+}
+
+static void
do_finalize (GObject *obj)
{
EmpathyAccountManager *manager = EMPATHY_ACCOUNT_MANAGER (obj);
EmpathyAccountManagerPriv *priv = GET_PRIV (manager);
g_hash_table_unref (priv->accounts);
+ g_hash_table_foreach (priv->connections, account_manager_disconnect_foreach,
+ obj);
g_hash_table_unref (priv->connections);
G_OBJECT_CLASS (empathy_account_manager_parent_class)->finalize (obj);