From 9ea269e02f748396ccd810bf701c605bf59a90e1 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 18 Sep 2013 19:23:52 +0100 Subject: [PATCH 09/10] mcd_account_self_contact_upgraded_cb: don't crash on bad timing If the account is disconnecting, we might get the callback for upgrading after we've already NULLed out self->priv->self_contact. --- src/mcd-account.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mcd-account.c b/src/mcd-account.c index 52bad97..fb03638 100644 --- a/src/mcd-account.c +++ b/src/mcd-account.c @@ -4925,6 +4925,11 @@ mcd_account_self_contact_upgraded_cb (GObject *source_object, tp_contact_get_presence_message (self_contact), self_contact); } + else if (self->priv->self_contact == NULL) + { + DEBUG ("self-contact '%s' has disappeared since we asked to " + "upgrade it", tp_contact_get_identifier (self_contact)); + } else { DEBUG ("self-contact '%s' has changed to '%s' since we asked to " -- 1.8.4.rc3