From 3ad2fef2d3bf155a6cae6889d1d0c6427f5e5298 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 5 Mar 2009 21:20:57 +0000 Subject: Prevent ICommander-generated subcommand trees from generating an exception when the tree root command is executes without another verb following it. Fixes Mantis #3258 --- OpenSim/Framework/Console/ConsoleBase.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/Console') diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index 588a39a..fda2037 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -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; } -- cgit v1.1