diff options
author | MW | 2009-02-26 15:06:27 +0000 |
---|---|---|
committer | MW | 2009-02-26 15:06:27 +0000 |
commit | 04a6c735d66781d3cd854025f9542141208f79e1 (patch) | |
tree | 2b124aee0fb05cc19cfd70718699c0d0fc6d6872 /OpenSim | |
parent | * Got rid of concrete GridDBService references (diff) | |
download | opensim-SC-04a6c735d66781d3cd854025f9542141208f79e1.zip opensim-SC-04a6c735d66781d3cd854025f9542141208f79e1.tar.gz opensim-SC-04a6c735d66781d3cd854025f9542141208f79e1.tar.bz2 opensim-SC-04a6c735d66781d3cd854025f9542141208f79e1.tar.xz |
Add check in SceneManager to stop opensim.exe crashing if no regions/scenes were loaded.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneManager.cs | 9 |
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 | { |