Mercurial > pidgin
diff libpurple/protocols/jabber/presence.c @ 24559:10ab5441572f
patch from darkrain42 that fixes a crash with a broken server, we probably
should have an util function that does string equality check but doesn't
crash on NULL. Too bad g_str_equal doesn't do that
Fixes #6972
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sat, 29 Nov 2008 01:35:02 +0000 |
parents | 39841a84c944 |
children | 61e0924de04a 25e2ab1fff1d e1f363f8fd6b 6f94b4a27372 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c Fri Nov 28 06:29:37 2008 +0000 +++ b/libpurple/protocols/jabber/presence.c Sat Nov 29 01:35:02 2008 +0000 @@ -513,7 +513,7 @@ } else if(!strcmp(y->name, "delay") && !strcmp(xmlns, "urn:xmpp:delay")) { /* XXX: compare the time. jabber:x:delay can happen on presence packets that aren't really and truly delayed */ delayed = TRUE; - } else if(!strcmp(y->name, "c") && !strcmp(xmlns, "http://jabber.org/protocol/caps")) { + } else if(xmlns && !strcmp(y->name, "c") && !strcmp(xmlns, "http://jabber.org/protocol/caps")) { caps = y; /* store for later, when creating buddy resource */ } else if(!strcmp(y->name, "x")) { const char *xmlns = xmlnode_get_namespace(y);