From d2a26f3b1a3d6e0fead0b2885347bb9e0d6d15bd Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 9 Oct 2012 11:27:57 +0100 Subject: [PATCH 5/7] Ignore changes to the avatar of former self-contacts This is highly theoretical, but in principle it could happen. --- src/mcd-account.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mcd-account.c b/src/mcd-account.c index 6041ba6..39db9fa 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"); -- 1.7.10.4