merge of '3d165f76c46146df36da0dec4871d6bb3cec5bae'

Thu, 13 Nov 2008 19:11:19 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Thu, 13 Nov 2008 19:11:19 +0000
changeset 24629
8bfc9042a1cf
parent 24628
3d165f76c461 (current diff)
parent 24626
17f8b6004658 (diff)
child 24630
e23afee76eab

merge of '3d165f76c46146df36da0dec4871d6bb3cec5bae'
and '17f8b60046587a9d5b28d5c9cb2d631b62220d9d'

--- a/libpurple/protocols/msn/slp.c	Thu Nov 13 18:55:04 2008 +0000
+++ b/libpurple/protocols/msn/slp.c	Thu Nov 13 19:11:19 2008 +0000
@@ -758,17 +758,20 @@
 
 	if (slplink->swboard == NULL)
 	{
-		/* We will need this in order to change its flags. */
-		slplink->swboard = (MsnSwitchBoard *)cmdproc->data;
-		/* If swboard is NULL, something has probably gone wrong earlier on
-		 * I didn't want to do this, but MSN 7 is somehow causing us to crash
-		 * here, I couldn't reproduce it to debug more, and people are
-		 * reporting bugs. Hopefully this doesn't cause more crashes. Stu.
-		 */
-		if (slplink->swboard != NULL)
+		if (cmdproc->data == NULL)
+			g_warning("msn_p2p_msg cmdproc->data was NULL\n");
+		else {
+			/*
+			 * We will swboard in order to change its flags.  If its
+			 * NULL, something has probably gone wrong earlier on.  I
+			 * didn't want to do this, but MSN 7 is somehow causing us
+			 * to crash here, I couldn't reproduce it to debug more,
+			 * and people are reporting bugs. Hopefully this doesn't
+			 * cause more crashes. Stu.
+			 */
+			slplink->swboard = (MsnSwitchBoard *)cmdproc->data;
 			slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink);
-		else
-			purple_debug_error("msn", "msn_p2p_msg, swboard is NULL, ouch!\n");
+		}
 	}
 
 	msn_slplink_process_msg(slplink, msg);

mercurial