changeset 30820:4b0cb9435414

Prevent a crash, this should never happen. It needs a little more work before being fixed.
author masca@cpw.pidgin.im
date Tue, 22 Jun 2010 22:03:55 +0000
parents c83902e953c4
children 721653babbbe
files libpurple/protocols/msn/msg.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msg.c	Mon Jun 21 07:11:25 2010 +0000
+++ b/libpurple/protocols/msn/msg.c	Tue Jun 22 22:03:55 2010 +0000
@@ -930,7 +930,10 @@
 
 	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