* check for null
authorArt Cancro <ajc@citadel.org>
Wed, 5 May 2010 16:02:06 +0000 (16:02 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 5 May 2010 16:02:06 +0000 (16:02 +0000)
citadel/modules/xmpp/xmpp_presence.c

index 7515dd09280a7b368e7560961d27f809048a5be8..ebb3576c2312c35104696d3a75dabfec512853ba 100644 (file)
@@ -122,6 +122,10 @@ void xmpp_wholist_presence_dump(void)
 void xmpp_destroy_buddy(char *presence_jid) {
        static int unsolicited_id = 1;
 
+       if (!presence_jid) return;
+       if (!XMPP) return;
+       if (!XMPP->client_jid) return;
+
        /* Transmit non-presence information */
        cprintf("<presence type=\"unavailable\" from=\"%s\" to=\"%s\"></presence>",
                presence_jid, XMPP->client_jid