Only create a new list to check if objects have reached targets if there actually are any targets.
parent
ff6c69000e
commit
984faf24df
|
@ -1692,16 +1692,20 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
private void CheckAtTargets()
|
||||
{
|
||||
List<SceneObjectGroup> objs = new List<SceneObjectGroup>();
|
||||
List<SceneObjectGroup> objs = null;
|
||||
|
||||
lock (m_groupsWithTargets)
|
||||
{
|
||||
foreach (SceneObjectGroup grp in m_groupsWithTargets.Values)
|
||||
objs.Add(grp);
|
||||
if (m_groupsWithTargets.Count != 0)
|
||||
objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values);
|
||||
}
|
||||
|
||||
if (objs != null)
|
||||
{
|
||||
foreach (SceneObjectGroup entry in objs)
|
||||
entry.checkAtTargets();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send out simstats data to all clients
|
||||
|
|
Loading…
Reference in New Issue