From c7f5a9476373260af44154103e488830f9f25bb4 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 11 Dec 2007 22:20:22 +0000 Subject: put in a try block to catch the ForEach loop dying. --- OpenSim/Region/Environment/Scenes/Scene.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 5febce6..fef02f0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1898,9 +1898,13 @@ namespace OpenSim.Region.Environment.Scenes // We don't want to try to send messages if there are no avatar. if (!(m_scenePresences.Equals(null))) { - foreach (ScenePresence presence in m_scenePresences.Values) - { - action(presence); + try { + foreach (ScenePresence presence in m_scenePresences.Values) + { + action(presence); + } + } catch (Exception e) { + MainLog.Instance.Verbose("BUG", e.ToString()); } } } -- cgit v1.1