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]; UUID uuid = friendIDsToReceiveFromOffline[i];
FriendRegionInfo info; FriendRegionInfo info;
if (friendRegions.TryGetValue(uuid, out info) && info.isOnline) if (friendRegions.TryGetValue(uuid, out info) && info != null && info.isOnline)
{ {
friendIDsToReceiveFromOffline.RemoveAt(i); friendIDsToReceiveFromOffline.RemoveAt(i);
friendIDsToReceiveFromOnline.Add(uuid); friendIDsToReceiveFromOnline.Add(uuid);
@ -906,7 +906,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
{ {
UUID uuid = friendIDsToSendTo[i]; UUID uuid = friendIDsToSendTo[i];
FriendRegionInfo info; 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... // any client is good enough, root or child...
ScenePresence agent = GetAnyPresenceFromAgentID(uuid); ScenePresence agent = GetAnyPresenceFromAgentID(uuid);