From 04a6c735d66781d3cd854025f9542141208f79e1 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 26 Feb 2009 15:06:27 +0000 Subject: Add check in SceneManager to stop opensim.exe crashing if no regions/scenes were loaded. --- OpenSim/Region/Framework/Scenes/SceneManager.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index 07c77aa..80634c0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -66,7 +66,14 @@ namespace OpenSim.Region.Framework.Scenes { if (m_currentScene == null) { - return m_localScenes[0]; + if (m_localScenes.Count > 0) + { + return m_localScenes[0]; + } + else + { + return null; + } } else { -- cgit v1.1