diff options
author | Melanie | 2012-10-28 18:41:47 +0000 |
---|---|---|
committer | Melanie | 2012-10-28 18:41:47 +0000 |
commit | 5a96ef52cb552c835cc109cb005db989eade5803 (patch) | |
tree | e6b249beb93b79562560aed5b306baf6ae9e1277 /OpenSim/Region/Framework/Scenes | |
parent | minor: Fix verbose IAR save message to make it a bit clearer that item data i... (diff) | |
download | opensim-SC_OLD-5a96ef52cb552c835cc109cb005db989eade5803.zip opensim-SC_OLD-5a96ef52cb552c835cc109cb005db989eade5803.tar.gz opensim-SC_OLD-5a96ef52cb552c835cc109cb005db989eade5803.tar.bz2 opensim-SC_OLD-5a96ef52cb552c835cc109cb005db989eade5803.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/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9c61fe7..2cdc4b3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1692,9 +1692,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1692 | 1692 | ||
1693 | private void CheckAtTargets() | 1693 | private void CheckAtTargets() |
1694 | { | 1694 | { |
1695 | Dictionary<UUID, SceneObjectGroup>.ValueCollection objs; | 1695 | List<SceneObjectGroup> objs = new List<SceneObjectGroup>(); |
1696 | lock (m_groupsWithTargets) | 1696 | lock (m_groupsWithTargets) |
1697 | objs = m_groupsWithTargets.Values; | 1697 | { |
1698 | foreach (SceneObjectGroup grp in m_groupsWithTargets.Values) | ||
1699 | objs.Add(grp); | ||
1700 | } | ||
1698 | 1701 | ||
1699 | foreach (SceneObjectGroup entry in objs) | 1702 | foreach (SceneObjectGroup entry in objs) |
1700 | entry.checkAtTargets(); | 1703 | entry.checkAtTargets(); |