diff options
author | Charles Krinke | 2009-02-23 23:14:04 +0000 |
---|---|---|
committer | Charles Krinke | 2009-02-23 23:14:04 +0000 |
commit | e9e5c175cd6a31ea4cec6bcdcca9a4a21acedee4 (patch) | |
tree | 7263cdf0bcf5efbec7a75e73ed61bf6c5131771a /OpenSim/Region | |
parent | Renamed IGridMessagingModule to IGridMessagingMapper. (diff) | |
download | opensim-SC-e9e5c175cd6a31ea4cec6bcdcca9a4a21acedee4.zip opensim-SC-e9e5c175cd6a31ea4cec6bcdcca9a4a21acedee4.tar.gz opensim-SC-e9e5c175cd6a31ea4cec6bcdcca9a4a21acedee4.tar.bz2 opensim-SC-e9e5c175cd6a31ea4cec6bcdcca9a4a21acedee4.tar.xz |
Thank you kindly, TLaukkan (Tommil) for a patch that solves:
If -background=true is specified on the command line, a null pointer exception crashes the server in OpenSim/Region/Application/OpenSimBase.cs in method StartupSpecific. Its trying to dereference m_console which is null, presumably because we're in background mode.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index ad7d06f..f3e3d4f 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -198,41 +198,46 @@ namespace OpenSim | |||
198 | // Only enable logins to the regions once we have completely finished starting up (apart from scripts) | 198 | // Only enable logins to the regions once we have completely finished starting up (apart from scripts) |
199 | m_commsManager.GridService.RegionLoginsEnabled = true; | 199 | m_commsManager.GridService.RegionLoginsEnabled = true; |
200 | 200 | ||
201 | List<string> topics = GetHelpTopics(); | 201 | // If console exists add plugin commands. |
202 | 202 | if (m_console != null) | |
203 | foreach (string topic in topics) | ||
204 | { | 203 | { |
205 | m_console.Commands.AddCommand("plugin", false, "help " + topic, | 204 | List<string> topics = GetHelpTopics(); |
206 | "help " + topic, | ||
207 | "Get help on plugin command '" + topic + "'", | ||
208 | HandleCommanderHelp); | ||
209 | 205 | ||
210 | m_console.Commands.AddCommand("plugin", false, topic, | 206 | foreach (string topic in topics) |
211 | topic, | 207 | { |
212 | "Execute subcommand for plugin '" + topic + "'", | 208 | m_console.Commands.AddCommand("plugin", false, "help " + topic, |
213 | null); | 209 | "help " + topic, |
210 | "Get help on plugin command '" + topic + "'", | ||
211 | HandleCommanderHelp); | ||
214 | 212 | ||
215 | ICommander commander = null; | 213 | m_console.Commands.AddCommand("plugin", false, topic, |
216 | 214 | topic, | |
217 | Scene s = SceneManager.CurrentOrFirstScene; | 215 | "Execute subcommand for plugin '" + topic + "'", |
216 | null); | ||
218 | 217 | ||
219 | if (s != null && s.GetCommanders() != null) | 218 | ICommander commander = null; |
220 | { | ||
221 | if (s.GetCommanders().ContainsKey(topic)) | ||
222 | commander = s.GetCommanders()[topic]; | ||
223 | } | ||
224 | 219 | ||
225 | if (commander == null) | 220 | Scene s = SceneManager.CurrentOrFirstScene; |
226 | continue; | ||
227 | 221 | ||
228 | foreach (string command in commander.Commands.Keys) | 222 | if (s != null && s.GetCommanders() != null) |
229 | { | 223 | { |
230 | m_console.Commands.AddCommand(topic, false, | 224 | if (s.GetCommanders().ContainsKey(topic)) |
231 | topic + " " + command, | 225 | commander = s.GetCommanders()[topic]; |
232 | topic + " " + commander.Commands[command].ShortHelp(), | 226 | } |
233 | String.Empty, HandleCommanderCommand); | 227 | |
228 | if (commander == null) | ||
229 | continue; | ||
230 | |||
231 | foreach (string command in commander.Commands.Keys) | ||
232 | { | ||
233 | m_console.Commands.AddCommand(topic, false, | ||
234 | topic + " " + command, | ||
235 | topic + " " + commander.Commands[command].ShortHelp(), | ||
236 | String.Empty, HandleCommanderCommand); | ||
237 | } | ||
234 | } | 238 | } |
235 | } | 239 | } |
240 | |||
236 | } | 241 | } |
237 | 242 | ||
238 | private void HandleCommanderCommand(string module, string[] cmd) | 243 | private void HandleCommanderCommand(string module, string[] cmd) |