Deep copy the collection of at_target objects so it can't be modified while

it's being iterated
integration
Melanie 2012-10-28 18:41:47 +00:00
parent 3531f29a6a
commit 5a96ef52cb
1 changed files with 5 additions and 2 deletions

View File

@ -1692,9 +1692,12 @@ namespace OpenSim.Region.Framework.Scenes
private void CheckAtTargets()
{
Dictionary<UUID, SceneObjectGroup>.ValueCollection objs;
List<SceneObjectGroup> objs = new List<SceneObjectGroup>();
lock (m_groupsWithTargets)
objs = m_groupsWithTargets.Values;
{
foreach (SceneObjectGroup grp in m_groupsWithTargets.Values)
objs.Add(grp);
}
foreach (SceneObjectGroup entry in objs)
entry.checkAtTargets();