Small fix for a possible NRE in standalone mode, killing the

client-thread. Will hopefully fix Mantis#2536.
0.6.0-stable
Homer Horwitz 2008-11-03 22:02:52 +00:00
parent 4ff0c39153
commit 39691e61a2
1 changed files with 2 additions and 2 deletions

View File

@ -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);