From 92e54bdd17cbab59c97a26eb51190b2233abe8b4 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 4 Mar 2008 18:49:44 +0000 Subject: this is probably just a band aid, but should at least help figure out where my last crash came from by being extra careful arround Add for scene object group. --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 4cc130e..575840e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1635,9 +1635,15 @@ namespace OpenSim.Region.Environment.Scenes /// public void AddPart(SceneObjectPart part) { - part.SetParent(this); - part.LinkNum = m_parts.Count; - m_parts.Add(part.UUID, part); + lock (m_parts) { + part.SetParent(this); + part.LinkNum = m_parts.Count; + try { + m_parts.Add(part.UUID, part); + } catch (Exception e) { + m_log.Error("Failed to add scened object part", e); + } + } } /// -- cgit v1.1