From a748e3cf4d08a94a674b4f675dc3a0457ab7c4e9 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 22 Dec 2009 15:34:22 +0000 Subject: account-settings: use empathy_signal_connect_weak to connect the ready signal on managers If for some reason this signal is fired after the settings has been destroyed, we shouldn't crash. --- libempathy/empathy-account-settings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c index 6b8b0177c..58b0b85ca 100644 --- a/libempathy/empathy-account-settings.c +++ b/libempathy/empathy-account-settings.c @@ -201,8 +201,8 @@ empathy_account_settings_constructed (GObject *object) { tp_account_prepare_async (priv->account, NULL, empathy_account_settings_account_ready_cb, self); - g_signal_connect (priv->managers, "notify::ready", - G_CALLBACK (empathy_account_settings_managers_ready_cb), self); + empathy_signal_connect_weak (priv->managers, "notify::ready", + G_CALLBACK (empathy_account_settings_managers_ready_cb), object); } if (G_OBJECT_CLASS ( -- cgit v1.2.3