avoid a null ref
parent
211a1fe9d4
commit
fb427daa34
|
@ -512,7 +512,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
if (((fi.MyFlags & (int)FriendRights.CanSeeOnline) != 0) && (fi.TheirFlags != -1))
|
if (((fi.MyFlags & (int)FriendRights.CanSeeOnline) != 0) && (fi.TheirFlags != -1))
|
||||||
friendList.Add(fi);
|
friendList.Add(fi);
|
||||||
}
|
}
|
||||||
|
if(friendList.Count > 0)
|
||||||
|
{
|
||||||
Util.FireAndForget(
|
Util.FireAndForget(
|
||||||
delegate
|
delegate
|
||||||
{
|
{
|
||||||
|
@ -526,6 +527,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected virtual void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online)
|
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
|
// 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.
|
// friend in what may be a very large friends list.
|
||||||
PresenceInfo[] friendSessions = PresenceService.GetAgents(remoteFriendStringIds.ToArray());
|
PresenceInfo[] friendSessions = PresenceService.GetAgents(remoteFriendStringIds.ToArray());
|
||||||
|
if(friendSessions == null)
|
||||||
|
return;
|
||||||
|
|
||||||
foreach (PresenceInfo friendSession in friendSessions)
|
foreach (PresenceInfo friendSession in friendSessions)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue