* Lock parts while they're being duplicated to prevent possible race conditions with other parts changers

* This shouldn't provoke any deadlocks since the callers aren't taking any other locks beforehand
0.6.3-post-fixes
Justin Clarke Casey 2009-02-03 18:06:24 +00:00
parent a9e76ce847
commit 35f9f2545d
1 changed files with 7 additions and 1 deletions

View File

@ -1393,7 +1393,13 @@ namespace OpenSim.Region.Environment.Scenes
m_rootPart.ScheduleFullUpdate();
}
List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values);
List<SceneObjectPart> partList;
lock (m_parts)
{
partList = new List<SceneObjectPart>(m_parts.Values);
}
partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2)
{
return p1.LinkNum.CompareTo(p2.LinkNum);