diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-06-12 14:52:25 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-06-12 14:52:25 +0800 |
commit | a522668fe62f6369749f79f3348ad811e23187b7 (patch) | |
tree | ab6ecb8b42584f41bd9af1e3bfde5b0dd076772f /libempathy | |
parent | 05c373949232e0afc96e2b559f80eb49971f5da0 (diff) | |
download | gsoc2013-empathy-a522668fe62f6369749f79f3348ad811e23187b7.tar gsoc2013-empathy-a522668fe62f6369749f79f3348ad811e23187b7.tar.gz gsoc2013-empathy-a522668fe62f6369749f79f3348ad811e23187b7.tar.bz2 gsoc2013-empathy-a522668fe62f6369749f79f3348ad811e23187b7.tar.lz gsoc2013-empathy-a522668fe62f6369749f79f3348ad811e23187b7.tar.xz gsoc2013-empathy-a522668fe62f6369749f79f3348ad811e23187b7.tar.zst gsoc2013-empathy-a522668fe62f6369749f79f3348ad811e23187b7.zip |
Check if there is a publish/subscribe list before adding/removing contacts from them. Fixes bug #537690.
svn path=/trunk/; revision=1160
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-tp-contact-list.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index 93f81e8fd..685b13ef4 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -843,8 +843,11 @@ tp_contact_list_add (EmpathyContactList *list, g_return_if_fail (EMPATHY_IS_TP_CONTACT_LIST (list)); - empathy_tp_group_add_member (priv->subscribe, contact, message); - if (g_list_find (priv->pendings, contact)) { + if (priv->subscribe) { + empathy_tp_group_add_member (priv->subscribe, contact, message); + } + + if (priv->publish && g_list_find (priv->pendings, contact)) { empathy_tp_group_add_member (priv->publish, contact, message); } } @@ -858,8 +861,12 @@ tp_contact_list_remove (EmpathyContactList *list, g_return_if_fail (EMPATHY_IS_TP_CONTACT_LIST (list)); - empathy_tp_group_remove_member (priv->subscribe, contact, message); - empathy_tp_group_remove_member (priv->publish, contact, message); + if (priv->subscribe) { + empathy_tp_group_remove_member (priv->subscribe, contact, message); + } + if (priv->publish) { + empathy_tp_group_remove_member (priv->publish, contact, message); + } } static GList * |