aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-10-28 18:41:47 +0000
committerMelanie2012-10-28 18:45:16 +0000
commit0d00b97aecf07a19d50ba57e7e717ffbbcd10658 (patch)
tree50e014194487cf6c56e6569f3a27aacb2e3d1436 /OpenSim
parentMerge branch 'ubitwork' into avination (diff)
downloadopensim-SC_OLD-0d00b97aecf07a19d50ba57e7e717ffbbcd10658.zip
opensim-SC_OLD-0d00b97aecf07a19d50ba57e7e717ffbbcd10658.tar.gz
opensim-SC_OLD-0d00b97aecf07a19d50ba57e7e717ffbbcd10658.tar.bz2
opensim-SC_OLD-0d00b97aecf07a19d50ba57e7e717ffbbcd10658.tar.xz
Deep copy the collection of at_target objects so it can't be modified while
it's being iterated
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 8034bc6..05ce00a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1666,7 +1666,10 @@ namespace OpenSim.Region.Framework.Scenes
1666 { 1666 {
1667 List<SceneObjectGroup> objs = new List<SceneObjectGroup>(); 1667 List<SceneObjectGroup> objs = new List<SceneObjectGroup>();
1668 lock (m_groupsWithTargets) 1668 lock (m_groupsWithTargets)
1669 objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values); 1669 {
1670 foreach (SceneObjectGroup grp in m_groupsWithTargets.Values)
1671 objs.Add(grp);
1672 }
1670 1673
1671 foreach (SceneObjectGroup entry in objs) 1674 foreach (SceneObjectGroup entry in objs)
1672 entry.checkAtTargets(); 1675 entry.checkAtTargets();