Prevent ICommander-generated subcommand trees from generating an exception

when the tree root command is executes without another verb following it.
Fixes Mantis #3258
0.6.4-rc1
Melanie Thielker 2009-03-05 21:20:57 +00:00
parent 11e1948b57
commit 3ad2fef2d3
1 changed files with 6 additions and 1 deletions

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;
}