aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:48:00 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:48:00 +0800
commitdb816940865c8c5e13cad68e249905f3aa5ccac0 (patch)
treea79cb64984dbb8df73c0c5388cb2dd10033ab3f4 /libempathy
parenta7da89d2a228975ee1c2df2c0aa0206123692c32 (diff)
downloadgsoc2013-empathy-db816940865c8c5e13cad68e249905f3aa5ccac0.tar
gsoc2013-empathy-db816940865c8c5e13cad68e249905f3aa5ccac0.tar.gz
gsoc2013-empathy-db816940865c8c5e13cad68e249905f3aa5ccac0.tar.bz2
gsoc2013-empathy-db816940865c8c5e13cad68e249905f3aa5ccac0.tar.lz
gsoc2013-empathy-db816940865c8c5e13cad68e249905f3aa5ccac0.tar.xz
gsoc2013-empathy-db816940865c8c5e13cad68e249905f3aa5ccac0.tar.zst
gsoc2013-empathy-db816940865c8c5e13cad68e249905f3aa5ccac0.zip
Don't own a reference to the EmpathyTpChat, otherwise it won't be
finalized. svn path=/trunk/; revision=2063
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-contact-monitor.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/libempathy/empathy-contact-monitor.c b/libempathy/empathy-contact-monitor.c
index 04a384bbf..8cd55d932 100644
--- a/libempathy/empathy-contact-monitor.c
+++ b/libempathy/empathy-contact-monitor.c
@@ -55,6 +55,13 @@ enum {
static void contact_remove_foreach (EmpathyContact *contact,
EmpathyContactMonitor *monitor);
+static void cl_members_changed_cb (EmpathyContactList *cl,
+ EmpathyContact *contact,
+ EmpathyContact *actor,
+ guint reason,
+ gchar *message,
+ gboolean is_member,
+ EmpathyContactMonitor *monitor);
static guint signals[LAST_SIGNAL];
@@ -102,7 +109,7 @@ do_finalize (GObject *obj)
EmpathyContactMonitorPriv *priv;
priv = GET_PRIV (obj);
-
+
if (priv->contacts) {
g_ptr_array_foreach (priv->contacts,
(GFunc) contact_remove_foreach, obj);
@@ -110,6 +117,11 @@ do_finalize (GObject *obj)
priv->contacts = NULL;
}
+ if (priv->proxy) {
+ g_signal_handlers_disconnect_by_func (priv->proxy,
+ cl_members_changed_cb, obj);
+ }
+
G_OBJECT_CLASS (empathy_contact_monitor_parent_class)->finalize (obj);
}
@@ -370,12 +382,7 @@ empathy_contact_monitor_set_proxy (EmpathyContactMonitor *self,
priv->contacts = NULL;
}
- if (priv->proxy != NULL) {
- g_object_unref (priv->proxy);
- priv->proxy = NULL;
- }
-
- priv->proxy = g_object_ref (proxy);
+ priv->proxy = proxy;
priv->contacts = g_ptr_array_new ();
g_signal_connect (proxy, "members-changed",