From 8031f8ec09df4f654c86a9c7bc498664f7b9d9dc Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 26 Aug 2010 00:08:53 +0100 Subject: Improve consistency of locking for SOG.m_parts in order to avoid race conditions in linking and unlinking --- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 84b7365..e08fa77 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -601,7 +601,10 @@ namespace OpenSim.Region.Framework.Scenes rootPart.Name = item.Name; rootPart.Description = item.Description; - List partList = new List(group.Children.Values); + List partList = null; + + lock (group.Children) + partList = new List(group.Children.Values); group.SetGroup(m_part.GroupID, null); -- cgit v1.1