aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index db055f9..2fdb48d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -369,26 +369,30 @@ namespace OpenSim.Region.Framework.Scenes
369 /// </summary> 369 /// </summary>
370 protected internal void UpdateObjectGroups() 370 protected internal void UpdateObjectGroups()
371 { 371 {
372 Dictionary<UUID, SceneObjectGroup> updates; 372 List<SceneObjectGroup> updates;
373
373 // Some updates add more updates to the updateList. 374 // Some updates add more updates to the updateList.
374 // Get the current list of updates and clear the list before iterating 375 // Get the current list of updates and clear the list before iterating
375 lock (m_updateList) 376 lock (m_updateList)
376 { 377 {
377 updates = new Dictionary<UUID, SceneObjectGroup>(m_updateList); 378 updates = new List<SceneObjectGroup>(m_updateList.Values);
378 m_updateList.Clear(); 379 m_updateList.Clear();
379 } 380 }
381
380 // Go through all updates 382 // Go through all updates
381 foreach (KeyValuePair<UUID, SceneObjectGroup> kvp in updates) 383 for (int i = 0; i < updates.Count; i++)
382 { 384 {
385 SceneObjectGroup sog = updates[i];
386
383 // Don't abort the whole update if one entity happens to give us an exception. 387 // Don't abort the whole update if one entity happens to give us an exception.
384 try 388 try
385 { 389 {
386 kvp.Value.Update(); 390 sog.Update();
387 } 391 }
388 catch (Exception e) 392 catch (Exception e)
389 { 393 {
390 m_log.ErrorFormat( 394 m_log.ErrorFormat(
391 "[INNER SCENE]: Failed to update {0}, {1} - {2}", kvp.Value.Name, kvp.Value.UUID, e); 395 "[INNER SCENE]: Failed to update {0}, {1} - {2}", sog.Name, sog.UUID, e);
392 } 396 }
393 } 397 }
394 } 398 }