From 39691e61a2cbfc59dcba6882c61943f7a19491b0 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Mon, 3 Nov 2008 22:02:52 +0000 Subject: Small fix for a possible NRE in standalone mode, killing the client-thread. Will hopefully fix Mantis#2536. --- OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/Avatar') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 33ca632..58251cb 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs @@ -885,7 +885,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends { UUID uuid = friendIDsToReceiveFromOffline[i]; FriendRegionInfo info; - if (friendRegions.TryGetValue(uuid, out info) && info.isOnline) + if (friendRegions.TryGetValue(uuid, out info) && info != null && info.isOnline) { friendIDsToReceiveFromOffline.RemoveAt(i); friendIDsToReceiveFromOnline.Add(uuid); @@ -906,7 +906,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends { UUID uuid = friendIDsToSendTo[i]; FriendRegionInfo info; - if (friendRegions.TryGetValue(uuid, out info) && info.isOnline) + if (friendRegions.TryGetValue(uuid, out info) && info != null && info.isOnline) { // any client is good enough, root or child... ScenePresence agent = GetAnyPresenceFromAgentID(uuid); -- cgit v1.1