aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorMelanie Thielker2009-02-13 20:49:23 +0000
committerMelanie Thielker2009-02-13 20:49:23 +0000
commita8f3d625cb3ac61b00c01e3f5af015b3d6c88105 (patch)
treec46694a2db0d4da6f161a7e1303d218182b7596d /OpenSim/Region/Application
parent* Change static field "initialized" in RestInterregionComms to an instance field (diff)
downloadopensim-SC_OLD-a8f3d625cb3ac61b00c01e3f5af015b3d6c88105.zip
opensim-SC_OLD-a8f3d625cb3ac61b00c01e3f5af015b3d6c88105.tar.gz
opensim-SC_OLD-a8f3d625cb3ac61b00c01e3f5af015b3d6c88105.tar.bz2
opensim-SC_OLD-a8f3d625cb3ac61b00c01e3f5af015b3d6c88105.tar.xz
Guard the values used to set the cursor position in the real time console
Diffstat (limited to 'OpenSim/Region/Application')
-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);