One should not lock null objects.

soprefactor
Melanie Thielker 2010-06-01 19:01:21 +02:00 committed by Melanie
parent 9c3c020697
commit a863eb9da3
1 changed files with 8 additions and 5 deletions

View File

@ -66,8 +66,6 @@ namespace OpenSim.Region.Framework.Scenes
}
public void SendPrimUpdates()
{
lock(m_pendingObjects)
{
if (m_pendingObjects == null)
{
@ -75,6 +73,8 @@ namespace OpenSim.Region.Framework.Scenes
{
m_pendingObjects = new Queue<SceneObjectGroup>();
lock(m_pendingObjects)
{
foreach (EntityBase e in m_presence.Scene.Entities)
{
if (e != null && e is SceneObjectGroup)
@ -82,7 +82,10 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
}
lock(m_pendingObjects)
{
while (m_pendingObjects != null && m_pendingObjects.Count > 0)
{
SceneObjectGroup g = m_pendingObjects.Dequeue();