# HG changeset patch # User Paul Aurich # Date 1242835144 0 # Node ID c9ac5cc1e46c5818d1227261235a3ccb9581fd30 # Parent a6a4b440e5aed27dbb98c0ab4f8c63edbf706adf Fix a crash when is present in a vcard, but has no data. Fixes MacinEnterprise's crash on Adium#12053 (unrelated to the rest of the ticket). diff -r a6a4b440e5ae -r c9ac5cc1e46c libpurple/protocols/jabber/presence.c --- 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);