diff src/protocols/msn/switchboard.c @ 6831:a372cf34387e

[gaim-migrate @ 7376] Fixed MSNSLP crashing! committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 14 Sep 2003 03:22:52 +0000
parents 1cfbb731aa1f
children bd433a45a463
line wrap: on
line diff
--- a/src/protocols/msn/switchboard.c	Sun Sep 14 03:11:02 2003 +0000
+++ b/src/protocols/msn/switchboard.c	Sun Sep 14 03:22:52 2003 +0000
@@ -94,7 +94,7 @@
 
 	send_clientcaps(swboard);
 
-	if (0 && session->protocol_ver >= 9)
+	if (session->protocol_ver >= 9)
 	{
 		MsnUser *local_user, *remote_user;
 
@@ -105,11 +105,14 @@
 								  gaim_account_get_username(session->account),
 								  NULL);
 
-		swboard->slp_session = msn_slp_session_new(swboard, TRUE);
+		if (msn_user_get_object(remote_user) != NULL)
+		{
+			swboard->slp_session = msn_slp_session_new(swboard, TRUE);
 
-		msn_slp_session_request_user_display(swboard->slp_session,
-											 local_user, remote_user,
-											 msn_user_get_object(remote_user));
+			msn_slp_session_request_user_display(swboard->slp_session,
+					local_user, remote_user,
+					msn_user_get_object(remote_user));
+		}
 	}
 
 	return TRUE;
@@ -214,7 +217,8 @@
 	if (swboard->total_users == 2 && swboard->chat == NULL) {
 		GaimConversation *conv;
 
-		conv = gaim_find_conversation_with_account(msn_user_get_passport(swboard->user), account);
+		conv = gaim_find_conversation_with_account(
+			msn_user_get_passport(swboard->user), account);
 
 		swboard->chat = serv_got_joined_chat(gc, ++swboard->chat_id,
 											 "MSN Chat");