taking another look at mantis #1502: adding necessary locks, checking for empty list.
parent
903dbcadd0
commit
b713f4a540
|
@ -122,8 +122,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
//SceneObjects.Clear();
|
//SceneObjects.Clear();
|
||||||
|
lock (Entities)
|
||||||
|
{
|
||||||
Entities.Clear();
|
Entities.Clear();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region Update Methods
|
#region Update Methods
|
||||||
|
|
||||||
|
@ -756,7 +759,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// Primitive Ray Tracing
|
// Primitive Ray Tracing
|
||||||
float closestDistance = 280f;
|
float closestDistance = 280f;
|
||||||
EntityIntersection returnResult = new EntityIntersection();
|
EntityIntersection returnResult = new EntityIntersection();
|
||||||
foreach (EntityBase ent in Entities.Values)
|
List<EntityBase> EntityList = GetEntities();
|
||||||
|
foreach (EntityBase ent in EntityList)
|
||||||
{
|
{
|
||||||
if (ent is SceneObjectGroup)
|
if (ent is SceneObjectGroup)
|
||||||
{
|
{
|
||||||
|
@ -845,8 +849,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected internal List<EntityBase> GetEntities()
|
protected internal List<EntityBase> GetEntities()
|
||||||
{
|
{
|
||||||
|
lock(Entities)
|
||||||
|
{
|
||||||
|
if (0 == Entities.Count) return null;
|
||||||
return new List<EntityBase>(Entities.Values);
|
return new List<EntityBase>(Entities.Values);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected internal Dictionary<uint, float> GetTopScripts()
|
protected internal Dictionary<uint, float> GetTopScripts()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue