aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneManager.cs
diff options
context:
space:
mode:
authorMW2009-02-26 15:06:27 +0000
committerMW2009-02-26 15:06:27 +0000
commit04a6c735d66781d3cd854025f9542141208f79e1 (patch)
tree2b124aee0fb05cc19cfd70718699c0d0fc6d6872 /OpenSim/Region/Framework/Scenes/SceneManager.cs
parent* Got rid of concrete GridDBService references (diff)
downloadopensim-SC_OLD-04a6c735d66781d3cd854025f9542141208f79e1.zip
opensim-SC_OLD-04a6c735d66781d3cd854025f9542141208f79e1.tar.gz
opensim-SC_OLD-04a6c735d66781d3cd854025f9542141208f79e1.tar.bz2
opensim-SC_OLD-04a6c735d66781d3cd854025f9542141208f79e1.tar.xz
Add check in SceneManager to stop opensim.exe crashing if no regions/scenes were loaded.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneManager.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs9
1 files changed, 8 insertions, 1 deletions
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
66 { 66 {
67 if (m_currentScene == null) 67 if (m_currentScene == null)
68 { 68 {
69 return m_localScenes[0]; 69 if (m_localScenes.Count > 0)
70 {
71 return m_localScenes[0];
72 }
73 else
74 {
75 return null;
76 }
70 } 77 }
71 else 78 else
72 { 79 {