aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 6518b84..6677dae 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4556,10 +4556,20 @@ namespace OpenSim.Region.Framework.Scenes
4556 /// Get a copy of the list of sitting avatars. 4556 /// Get a copy of the list of sitting avatars.
4557 /// </summary> 4557 /// </summary>
4558 /// <remarks>This applies to all sitting avatars whether there is a sit target set or not.</remarks> 4558 /// <remarks>This applies to all sitting avatars whether there is a sit target set or not.</remarks>
4559 /// <returns></returns> 4559 /// <returns>A hashset of the sitting avatars. Returns null if there are no sitting avatars.</returns>
4560 public HashSet<UUID> GetSittingAvatars() 4560 public HashSet<UUID> GetSittingAvatars()
4561 { 4561 {
4562 return new HashSet<UUID>(m_sittingAvatars); 4562 HashSet<UUID> sittingAvatars = m_sittingAvatars;
4563
4564 if (sittingAvatars == null)
4565 {
4566 return null;
4567 }
4568 else
4569 {
4570 lock (sittingAvatars)
4571 return new HashSet<UUID>(sittingAvatars);
4572 }
4563 } 4573 }
4564 4574
4565 /// <summary> 4575 /// <summary>