Copying a ref type under lock doesn't dissociate it from the source.

Use a new list to do that.
avinationmerge
Melanie 2010-12-29 21:02:45 +01:00
parent 88db69e017
commit dbaaccf92a
1 changed files with 2 additions and 2 deletions

View File

@ -1428,9 +1428,9 @@ 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;
objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values);
foreach (SceneObjectGroup entry in objs)
entry.checkAtTargets();