From 1e365df49500b3b814b7f9ae67ab2af0acc984a3 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 13 Jan 2009 16:49:01 +0000 Subject: * minor: Stop friendship termination crashing the client thread if the friend to be terminated could not be found --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 3 +-- OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index f1a3c7f..a90c380 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -307,8 +307,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP catch (System.ObjectDisposedException) { m_log.Info("[UDPSERVER]: UDP Object disposed. No need to worry about this if you're restarting the simulator."); - } - + } } /// diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 4a03ecd..9efaf81 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs @@ -671,6 +671,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends { // wasn't sent, so ex-friend wasn't around on this region-server. Fetch info and try to send UserAgentData data = m_initialScene.CommsManager.UserService.GetAgentByUUID(exfriendID); + + if (null == data) + break; + if (!data.AgentOnline) { m_log.DebugFormat("[FRIEND]: {0} is offline, so not sending TerminateFriend", exfriendID); -- cgit v1.1