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

it's being iterated
0.7.4-extended
Melanie 2012-10-28 18:41:47 +00:00 committed by Justin Clark-Casey (justincc)
parent 9d70f48207
commit fe195e0a9c
1 changed files with 5 additions and 2 deletions

View File

@ -1648,9 +1648,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();