pidgin: e83f93ec: Add some safety to jabber_send_signal_cb...

nosnilmot at pidgin.im nosnilmot at pidgin.im
Wed Nov 25 14:08:26 EST 2009


-----------------------------------------------------------------
Revision: e83f93ec8807b2e0be9a78c01c0a4647a1448067
Ancestor: dcb994e72c6cc6245bdcf08a4405b480464d6b35
Author: nosnilmot at pidgin.im
Date: 2009-11-25T19:00:39
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e83f93ec8807b2e0be9a78c01c0a4647a1448067

Modified files:
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

Add some safety to jabber_send_signal_cb in case someone else was listening
to jabber-sending-xmlnode and caused the connection to get disconnected
before the signal got to calling jabber_send_signal_cb. Should fix
https://bugzilla.redhat.com/show_bug.cgi?id=540835

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	80eb4367a92a0b7ae0d294d52a96c6cd65dcca04
+++ libpurple/protocols/jabber/jabber.c	c2a68c8d08099a3020f7c42ae07be750393b222c
@@ -476,7 +476,14 @@ void jabber_send_signal_cb(PurpleConnect
 	if (NULL == packet)
 		return;
 
+	if (!PURPLE_CONNECTION_IS_VALID(pc))
+		return;
+
 	js = purple_connection_get_protocol_data(pc);
+
+	if (NULL == js)
+		return;
+
 	if (js->bosh)
 		if (g_str_equal((*packet)->name, "message") ||
 				g_str_equal((*packet)->name, "iq") ||


More information about the Commits mailing list