avoid a null ref

httptests
UbitUmarov 2017-05-11 19:06:49 +01:00
parent 211a1fe9d4
commit fb427daa34
1 changed files with 15 additions and 11 deletions

View File

@ -512,7 +512,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
if (((fi.MyFlags & (int)FriendRights.CanSeeOnline) != 0) && (fi.TheirFlags != -1))
friendList.Add(fi);
}
if(friendList.Count > 0)
{
Util.FireAndForget(
delegate
{
@ -526,6 +527,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
);
}
}
}
protected virtual void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online)
{
@ -552,6 +554,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
// We do this regrouping so that we can efficiently send a single request rather than one for each
// friend in what may be a very large friends list.
PresenceInfo[] friendSessions = PresenceService.GetAgents(remoteFriendStringIds.ToArray());
if(friendSessions == null)
return;
foreach (PresenceInfo friendSession in friendSessions)
{