diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 5efe188544..4bdc52cee9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1562,7 +1562,8 @@ namespace OpenSim.Region.Framework.Scenes
///
protected internal void LinkObjects(IClientAPI client, uint parentPrimId, List childPrimIds)
{
- lock (m_updateLock)
+ Monitor.Enter(m_updateLock);
+ try
{
SceneObjectGroup parentGroup = GetGroupByPrim(parentPrimId);
@@ -1617,6 +1618,10 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
+ finally
+ {
+ Monitor.Exit(m_updateLock);
+ }
}
///
@@ -1630,7 +1635,8 @@ namespace OpenSim.Region.Framework.Scenes
protected internal void DelinkObjects(List primIds, bool sendEvents)
{
- lock (m_updateLock)
+ Monitor.Enter(m_updateLock);
+ try
{
List childParts = new List();
List rootParts = new List();
@@ -1737,6 +1743,10 @@ namespace OpenSim.Region.Framework.Scenes
g.ScheduleGroupForFullUpdate();
}
}
+ finally
+ {
+ Monitor.Exit(m_updateLock);
+ }
}
protected internal void MakeObjectSearchable(IClientAPI remoteClient, bool IncludeInSearch, uint localID)