diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2006-10-13 15:10:22 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2006-10-13 15:10:22 +0000 |
commit | f5b62bb8121d3f99e1af673fb5b7522d25be4010 (patch) | |
tree | bf3e3a44b2a4811c0f9cc8299e1d106fae5dc860 | |
parent | 8350ea042cd6431bcd85750fddedfc321829c39d (diff) |
Cope with vCards with neither <NICKNAME> nor <FN>
-rw-r--r-- | src/vcard-manager.c | 5 |
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) |