diff libpurple/protocols/msn/slplink.c @ 29894:a0adf0bb19b7

Re-order msg_ack, since purple_xfer_prpl_ready might cancel the transfer and free some pointers. At least, I think that's what valgrind says.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 28 Feb 2010 06:46:32 +0000
parents f8a95fdab3bd
children b0bc67f42027 10bf97a36be0 119bd7b072eb 9a86ddd0914e
line wrap: on
line diff
--- a/libpurple/protocols/msn/slplink.c	Sun Feb 28 04:06:46 2010 +0000
+++ b/libpurple/protocols/msn/slplink.c	Sun Feb 28 06:46:32 2010 +0000
@@ -307,6 +307,8 @@
 
 	slpmsg->offset += msg->msnslp_header.length;
 
+	slpmsg->msgs = g_list_remove(slpmsg->msgs, msg);
+
 	if (slpmsg->offset < real_size)
 	{
 		if (slpmsg->slpcall->xfer && purple_xfer_get_status(slpmsg->slpcall->xfer) == PURPLE_XFER_STATUS_STARTED)
@@ -331,8 +333,6 @@
 			}
 		}
 	}
-
-	slpmsg->msgs = g_list_remove(slpmsg->msgs, msg);
 }
 
 /* We have received the message nak. */