mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Fix recent SOP.GetSittingAvatars() to return null if there are no sitting avatars rather than throwing an exception.
Extends sitting avatar regression tests to test new sitters information
This commit is contained in:
@@ -4556,10 +4556,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// Get a copy of the list of sitting avatars.
|
||||
/// </summary>
|
||||
/// <remarks>This applies to all sitting avatars whether there is a sit target set or not.</remarks>
|
||||
/// <returns></returns>
|
||||
/// <returns>A hashset of the sitting avatars. Returns null if there are no sitting avatars.</returns>
|
||||
public HashSet<UUID> GetSittingAvatars()
|
||||
{
|
||||
return new HashSet<UUID>(m_sittingAvatars);
|
||||
HashSet<UUID> sittingAvatars = m_sittingAvatars;
|
||||
|
||||
if (sittingAvatars == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
lock (sittingAvatars)
|
||||
return new HashSet<UUID>(sittingAvatars);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user