]> git.0d.be Git - empathy.git/commitdiff
When setting an EmpathyContact's Persona, disconnect existing signal handler
authorTravis Reitter <travis.reitter@collabora.co.uk>
Mon, 23 Aug 2010 18:37:42 +0000 (11:37 -0700)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Tue, 24 Aug 2010 14:57:28 +0000 (07:57 -0700)
libempathy/empathy-contact.c

index 260543155810c89fd11e77560302b40aba08fc0d..ea78476a9264c8d345f937ba9e57cb5437e3f45d 100644 (file)
@@ -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",