aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 35134d6..a4b8944 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -3651,7 +3651,8 @@ namespace OpenSim.Region.Framework.Scenes
3651 if (atRotTargets.Count > 0) 3651 if (atRotTargets.Count > 0)
3652 { 3652 {
3653 uint[] localids = new uint[0]; 3653 uint[] localids = new uint[0];
3654 lock (m_parts) 3654 lockPartsForRead(true);
3655 try
3655 { 3656 {
3656 localids = new uint[m_parts.Count]; 3657 localids = new uint[m_parts.Count];
3657 int cntr = 0; 3658 int cntr = 0;
@@ -3661,6 +3662,10 @@ namespace OpenSim.Region.Framework.Scenes
3661 cntr++; 3662 cntr++;
3662 } 3663 }
3663 } 3664 }
3665 finally
3666 {
3667 lockPartsForRead(false);
3668 }
3664 3669
3665 for (int ctr = 0; ctr < localids.Length; ctr++) 3670 for (int ctr = 0; ctr < localids.Length; ctr++)
3666 { 3671 {
@@ -3679,7 +3684,8 @@ namespace OpenSim.Region.Framework.Scenes
3679 { 3684 {
3680 //trigger not_at_target 3685 //trigger not_at_target
3681 uint[] localids = new uint[0]; 3686 uint[] localids = new uint[0];
3682 lock (m_parts) 3687 lockPartsForRead(true);
3688 try
3683 { 3689 {
3684 localids = new uint[m_parts.Count]; 3690 localids = new uint[m_parts.Count];
3685 int cntr = 0; 3691 int cntr = 0;
@@ -3689,6 +3695,10 @@ namespace OpenSim.Region.Framework.Scenes
3689 cntr++; 3695 cntr++;
3690 } 3696 }
3691 } 3697 }
3698 finally
3699 {
3700 lockPartsForRead(false);
3701 }
3692 3702
3693 for (int ctr = 0; ctr < localids.Length; ctr++) 3703 for (int ctr = 0; ctr < localids.Length; ctr++)
3694 { 3704 {