Prevent ICommander-generated subcommand trees from generating an exception

when the tree root command is executes without another verb following it.
Fixes Mantis #3258
This commit is contained in:
Melanie Thielker
2009-03-05 21:20:57 +00:00
parent 11e1948b57
commit 3ad2fef2d3

View File

@@ -358,7 +358,12 @@ namespace OpenSim.Framework.Console
if (ci.fn.Count == 0)
return new string[0];
foreach (CommandDelegate fn in ci.fn)
fn(ci.module, result);
{
if (fn != null)
fn(ci.module, result);
else
return new string[0];
}
return result;
}