Lock the object queue when dequeueing

soprefactor
Melanie 2010-06-01 15:08:45 +01:00
parent 5270e54268
commit 9c3c020697
1 changed files with 89 additions and 86 deletions

View File

@ -66,6 +66,8 @@ namespace OpenSim.Region.Framework.Scenes
} }
public void SendPrimUpdates() public void SendPrimUpdates()
{
lock(m_pendingObjects)
{ {
if (m_pendingObjects == null) if (m_pendingObjects == null)
{ {
@ -75,7 +77,7 @@ namespace OpenSim.Region.Framework.Scenes
foreach (EntityBase e in m_presence.Scene.Entities) foreach (EntityBase e in m_presence.Scene.Entities)
{ {
if (e is SceneObjectGroup) if (e != null && e is SceneObjectGroup)
m_pendingObjects.Enqueue((SceneObjectGroup)e); m_pendingObjects.Enqueue((SceneObjectGroup)e);
} }
} }
@ -169,6 +171,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
}
public void Reset() public void Reset()
{ {