changeset 28640:7622d3f86752

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
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 25 Nov 2009 19:00:39 +0000
parents f4a95b3424d1
children dca1bda0e5e6
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Wed Nov 25 16:39:29 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Wed Nov 25 19:00:39 2009 +0000
@@ -476,7 +476,14 @@
 	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") ||