From a79f4193bb6958ebd620f437b0d786e4449d9eed Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Mon, 11 Jul 2011 10:45:41 +0100 Subject: EmpathyContact: don't crash if a contact doesn't have an account https://bugzilla.gnome.org/show_bug.cgi?id=654256 --- libempathy/empathy-contact.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index ed7af6c38..16f1dc900 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -683,12 +683,15 @@ contact_is_tpl_entity (gpointer key, { EmpathyContact *contact = value; FindContactData *data = user_data; + TpAccount *account = empathy_contact_get_account (contact); + const gchar *path = NULL; + + if (account != NULL) + path = tp_proxy_get_object_path (account); return !tp_strdiff (empathy_contact_get_id (contact), tpl_entity_get_identifier (data->entity)) && - !tp_strdiff (tp_proxy_get_object_path (data->account), - tp_proxy_get_object_path ( - empathy_contact_get_account (contact))); + !tp_strdiff (tp_proxy_get_object_path (data->account), path); } EmpathyContact * -- cgit v1.2.3