summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-10-09 11:27:57 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-10-09 11:27:57 +0100
commitd2a26f3b1a3d6e0fead0b2885347bb9e0d6d15bd (patch)
tree77a4694f48b75eed5a948d80260353c4c9d1b769
parent90dd8c46e8457629140397d6e6afacfe9f2eea6b (diff)
Ignore changes to the avatar of former self-contacts
This is highly theoretical, but in principle it could happen.
-rw-r--r--src/mcd-account.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 6041ba67..39db9fa3 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -1373,12 +1373,18 @@ mcd_account_self_contact_notify_avatar_file_cb (McdAccount *self,
GParamSpec *unused_param_spec G_GNUC_UNUSED,
TpContact *self_contact)
{
- const gchar *token = tp_contact_get_avatar_token (self_contact);
+ const gchar *token;
gchar *prev_token;
- GFile *file = tp_contact_get_avatar_file (self_contact);
+ GFile *file;
GError *error = NULL;
gboolean changed;
+ if (self_contact != self->priv->self_contact)
+ return;
+
+ file = tp_contact_get_avatar_file (self_contact);
+ token = tp_contact_get_avatar_token (self_contact);
+
if (self->priv->setting_avatar)
{
DEBUG ("Ignoring avatar change notification: we are setting ours");