# HG changeset patch # User Ka-Hing Cheung # Date 1227922502 0 # Node ID 10ab5441572f7a12c3b6dc4a30a3be39aa0d22f3 # Parent e2e57d3c0578f44a75c1f1f47f4db865588f660f 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 diff -r e2e57d3c0578 -r 10ab5441572f libpurple/protocols/jabber/presence.c --- 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);