From 4f79cd98c0501367570bc140776b5ec40bfee49c Mon Sep 17 00:00:00 2001 From: Travis Reitter Date: Mon, 23 Aug 2010 11:37:42 -0700 Subject: When setting an EmpathyContact's Persona, disconnect existing signal handler --- libempathy/empathy-contact.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libempathy/empathy-contact.c') diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 260543155..ea78476a9 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -822,7 +822,11 @@ empathy_contact_set_persona (EmpathyContact *contact, return; if (priv->persona != NULL) - g_object_unref (priv->persona); + { + g_signal_handlers_disconnect_by_func (priv->persona, + folks_persona_notify_cb, contact); + g_object_unref (priv->persona); + } priv->persona = g_object_ref (persona); g_signal_connect (priv->persona, "notify", -- cgit v1.2.3