aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index f4e28be..914bd7e 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -154,7 +154,9 @@ namespace OpenSim
154 protected override List<string> GetHelpTopics() 154 protected override List<string> GetHelpTopics()
155 { 155 {
156 List<string> topics = base.GetHelpTopics(); 156 List<string> topics = base.GetHelpTopics();
157 topics.AddRange(SceneManager.CurrentOrFirstScene.GetCommanders().Keys); 157 Scene s = SceneManager.CurrentOrFirstScene;
158 if (s != null && s.GetCommanders() != null)
159 topics.AddRange(s.GetCommanders().Keys);
158 160
159 return topics; 161 return topics;
160 } 162 }
@@ -204,8 +206,15 @@ namespace OpenSim
204 "Execute subcommand for plugin '" + topic + "'", 206 "Execute subcommand for plugin '" + topic + "'",
205 null); 207 null);
206 208
207 ICommander commander = 209 ICommander commander = null;
208 SceneManager.CurrentOrFirstScene.GetCommanders()[topic]; 210
211 Scene s = SceneManager.CurrentOrFirstScene;
212
213 if (s != null && s.GetCommanders() != null)
214 {
215 if (s.GetCommanders().ContainsKey(topic))
216 commander = s.GetCommanders()[topic];
217 }
209 218
210 if (commander == null) 219 if (commander == null)
211 continue; 220 continue;
@@ -227,6 +236,9 @@ namespace OpenSim
227 236
228 private void HandleCommanderHelp(string module, string[] cmd) 237 private void HandleCommanderHelp(string module, string[] cmd)
229 { 238 {
239 // Only safe for the interactive console, since it won't
240 // let us come here unless both scene and commander exist
241 //
230 ICommander moduleCommander = SceneManager.CurrentOrFirstScene.GetCommander(cmd[1]); 242 ICommander moduleCommander = SceneManager.CurrentOrFirstScene.GetCommander(cmd[1]);
231 if (moduleCommander != null) 243 if (moduleCommander != null)
232 m_console.Notice(moduleCommander.Help); 244 m_console.Notice(moduleCommander.Help);