aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-11 17:45:41 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-12 01:45:59 +0800
commita79f4193bb6958ebd620f437b0d786e4449d9eed (patch)
tree911c55bd10569bfb3c90a2d0251355b4995f3360
parent342a4344f7f62d7b55e64f6f708b4b696b0765c3 (diff)
downloadgsoc2013-empathy-a79f4193bb6958ebd620f437b0d786e4449d9eed.tar
gsoc2013-empathy-a79f4193bb6958ebd620f437b0d786e4449d9eed.tar.gz
gsoc2013-empathy-a79f4193bb6958ebd620f437b0d786e4449d9eed.tar.bz2
gsoc2013-empathy-a79f4193bb6958ebd620f437b0d786e4449d9eed.tar.lz
gsoc2013-empathy-a79f4193bb6958ebd620f437b0d786e4449d9eed.tar.xz
gsoc2013-empathy-a79f4193bb6958ebd620f437b0d786e4449d9eed.tar.zst
gsoc2013-empathy-a79f4193bb6958ebd620f437b0d786e4449d9eed.zip
EmpathyContact: don't crash if a contact doesn't have an account
https://bugzilla.gnome.org/show_bug.cgi?id=654256
-rw-r--r--libempathy/empathy-contact.c9
1 files 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 *