changeset 10887:bda4b39a22b8

[gaim-migrate @ 12591] Work around the MSN-7-somehow-related crash here too committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 28 Apr 2005 20:47:04 +0000
parents 0ece4cf68ea6
children 29bec53bd2d2
files src/protocols/msn/slp.c
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/slp.c	Thu Apr 28 03:23:18 2005 +0000
+++ b/src/protocols/msn/slp.c	Thu Apr 28 20:47:04 2005 +0000
@@ -733,9 +733,17 @@
 
 	if (slplink->swboard == NULL)
 	{
-		/* We will need this in order to change it's flags. */
+		/* We will need this in order to change its flags. */
 		slplink->swboard = (MsnSwitchBoard *)cmdproc->data;
-		slplink->swboard->slplink = slplink;
+		/* 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)
+			slplink->swboard->slplink = slplink;
+		else
+			gaim_debug_error("msn", "msn_p2p_msg, swboard is NULL, ouch!\n");
 	}
 
 	msn_slplink_process_msg(slplink, msg);