summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2006-10-13 15:10:22 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2006-10-13 15:10:22 +0000
commitf5b62bb8121d3f99e1af673fb5b7522d25be4010 (patch)
treebf3e3a44b2a4811c0f9cc8299e1d106fae5dc860
parent8350ea042cd6431bcd85750fddedfc321829c39d (diff)
Cope with vCards with neither <NICKNAME> nor <FN>
-rw-r--r--src/vcard-manager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vcard-manager.c b/src/vcard-manager.c
index 6572df1ec..e239c56dd 100644
--- a/src/vcard-manager.c
+++ b/src/vcard-manager.c
@@ -398,10 +398,11 @@ observe_vcard (GabbleConnection *conn, GabbleVCardManager *manager,
}
else
{
- const gchar *fn;
+ const gchar *fn = NULL;
/* let's see if they have a FN (formatted name) instead */
nick_node = lm_message_node_get_child (vcard_node, "FN");
- fn = lm_message_node_get_value (nick_node);
+ if (nick_node)
+ fn = lm_message_node_get_value (nick_node);
DEBUG ("%u has no <NICKNAME>, but has <FN> \"%s\"", handle,
fn ? fn : "(null)");
if (fn && *fn)