soc.2010.msn-tlc: b9015542: Prevent a crash, this should never happe...

masca at cpw.pidgin.im masca at cpw.pidgin.im
Thu Jun 24 02:16:53 EDT 2010


-----------------------------------------------------------------
Revision: b9015542a27b73c8708408e48069d83aa603c68b
Ancestor: d22f5fd47878d95ae78e4af780a6f648bd4d0d90
Author: masca at cpw.pidgin.im
Date: 2010-06-22T22:03:55
Branch: im.pidgin.soc.2010.msn-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/b9015542a27b73c8708408e48069d83aa603c68b

Modified files:
        libpurple/protocols/msn/msg.c

ChangeLog: 

Prevent a crash, this should never happen. It needs a little more work before being fixed.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msg.c	f6b5b68b071e7400439c20a9a5141991701cf4c1
+++ libpurple/protocols/msn/msg.c	607d0e4f518b5e5b487cc73bcc2c41d6dc8308d2
@@ -930,7 +930,10 @@ msn_p2p_msg(MsnCmdProc *cmdproc, MsnMess
 
 	data = msn_message_get_bin_data(msg, &len);
 
-	msn_slplink_process_msg(slplink, msg->part->header, data, len);
+	if (msg->part)
+		msn_slplink_process_msg(slplink, msg->part->header, data, len);
+	else /* This should never happen. */
+		purple_debug_fatal("msn", "P2P message without a Part.\n");
 }
 
 static void


More information about the Commits mailing list