cpw.malu.xmpp.jingle_ft: 16ed51cd: Fix a crash if the initiator cancels the...

malu at pidgin.im malu at pidgin.im
Thu Apr 16 16:31:04 EDT 2009


-----------------------------------------------------------------
Revision: 16ed51cdfe4abd968be5d6f79b39696b356ac80d
Ancestor: 99115b9a56a431e5d91ef6db6b074953639687ff
Author: malu at pidgin.im
Date: 2009-04-16T20:25:28
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/16ed51cdfe4abd968be5d6f79b39696b356ac80d

Modified files:
        libpurple/protocols/jabber/jingle/file-transfer.c

ChangeLog: 

Fix a crash if the initiator cancels the transfer before the receiver has
accepted, and the receiver then accepts and selects a save location

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/file-transfer.c	024642404a0f7a2bad82d885619efcea2441c9cc
+++ libpurple/protocols/jabber/jingle/file-transfer.c	5c6d7aa19ef527328a04a55a41063aa84579b2bf
@@ -474,7 +474,7 @@ jingle_file_transfer_xfer_init(PurpleXfe
 			/* start local listen on the S5B transport */
 			jingle_s5b_gather_streamhosts(session, JINGLE_S5B(transport));
 		}	
-	} else {
+	} else if (xfer->data) {
 		JingleContent *content = (JingleContent *) xfer->data;
 		JingleSession *session = jingle_content_get_session(content);
 		JingleTransport *transport = jingle_content_get_transport(content);
@@ -706,6 +706,7 @@ jingle_file_transfer_handle_action_inter
 				if (!purple_xfer_is_canceled(xfer))
 					purple_xfer_end(xfer);
 				JINGLE_FT_GET_PRIVATE(JINGLE_FT(content))->xfer = NULL;
+				xfer->data = NULL;
 			}
 	
 			g_object_unref(session);


More information about the Commits mailing list