* 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

@ -1392,8 +1392,14 @@ namespace OpenSim.Region.Environment.Scenes
SetRootPartOwner(m_rootPart, cAgentID, cGroupID);
m_rootPart.ScheduleFullUpdate();
}
List<SceneObjectPart> partList;
List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values);
lock (m_parts)
{
partList = new List<SceneObjectPart>(m_parts.Values);
}
partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2)
{
return p1.LinkNum.CompareTo(p2.LinkNum);