Mercurial > pidgin
changeset 26920:c9ac5cc1e46c
Fix a crash when <NICKNAME/> is present in a vcard, but has no data.
Fixes MacinEnterprise's crash on Adium#12053 (unrelated to the rest of the ticket).
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 20 May 2009 15:59:04 +0000 |
parents | a6a4b440e5ae |
children | 5541ea5e9d1e |
files | libpurple/protocols/jabber/presence.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c Wed May 20 00:39:12 2009 +0000 +++ b/libpurple/protocols/jabber/presence.c Wed May 20 15:59:04 2009 +0000 @@ -361,10 +361,10 @@ if ((nick = xmlnode_get_child(vcard, "NICKNAME"))) { char *tmp = xmlnode_get_data(nick); char *bare_jid = jabber_get_bare_jid(from); - if (strstr(bare_jid, tmp) == NULL) { + if (tmp && strstr(bare_jid, tmp) == NULL) { g_free(nickname); nickname = tmp; - } else + } else if (tmp) g_free(tmp); g_free(bare_jid);