avoid a null ref
parent
211a1fe9d4
commit
fb427daa34
|
@ -512,18 +512,20 @@ 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(
|
||||||
|
delegate
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[FRIENDS MODULE]: Notifying {0} friends of {1} of online status {2}",
|
||||||
|
// friendList.Count, agentID, online);
|
||||||
|
|
||||||
Util.FireAndForget(
|
// Notify about this user status
|
||||||
delegate
|
StatusNotify(friendList, agentID, online);
|
||||||
{
|
}, null, "FriendsModule.StatusChange"
|
||||||
// m_log.DebugFormat(
|
);
|
||||||
// "[FRIENDS MODULE]: Notifying {0} friends of {1} of online status {2}",
|
}
|
||||||
// friendList.Count, agentID, online);
|
|
||||||
|
|
||||||
// Notify about this user status
|
|
||||||
StatusNotify(friendList, agentID, online);
|
|
||||||
}, null, "FriendsModule.StatusChange"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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