diff options
author | Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> | 2011-09-01 00:28:35 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-09-02 21:17:33 +0800 |
commit | 01086a035fcf1b128bd9547219aa00c8768e0118 (patch) | |
tree | 06a1af23c143d819d6d9c9521253747445a98799 /libempathy-gtk | |
parent | 96a577f74ee233951f6b61b0fb8b1bbe70a1e12e (diff) | |
download | gsoc2013-empathy-01086a035fcf1b128bd9547219aa00c8768e0118.tar gsoc2013-empathy-01086a035fcf1b128bd9547219aa00c8768e0118.tar.gz gsoc2013-empathy-01086a035fcf1b128bd9547219aa00c8768e0118.tar.bz2 gsoc2013-empathy-01086a035fcf1b128bd9547219aa00c8768e0118.tar.lz gsoc2013-empathy-01086a035fcf1b128bd9547219aa00c8768e0118.tar.xz gsoc2013-empathy-01086a035fcf1b128bd9547219aa00c8768e0118.tar.zst gsoc2013-empathy-01086a035fcf1b128bd9547219aa00c8768e0118.zip |
Fixes a segfault in empathy-individual-store.c
When a contact cannot be obtained from an individual, icon_name and
contact will be NULL, leading to g_hash_table_lookup for a NULL-value,
segfaulting.
Although there's probably an underlying error somewhere, the NULL case
should be handled, being a valid return value for the method;
https://bugzilla.gnome.org/show_bug.cgi?id=657914
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-individual-store.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c index 74c3a1452..d21a9d50b 100644 --- a/libempathy-gtk/empathy-individual-store.c +++ b/libempathy-gtk/empathy-individual-store.c @@ -2033,6 +2033,14 @@ individual_store_get_individual_status_icon_with_icon_name ( icon_name = g_strdup_printf ("%s-%s", status_icon_name, protocol_name); } + else + { + g_warning ("Cannot retrieve contact from individual '%s'", + folks_alias_details_get_alias ( + FOLKS_ALIAS_DETAILS (individual))); + + return NULL; + } } else { |