From c8135834db90dc438543a3906fffe1024f4c9a03 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Fri, 17 Jul 2015 16:46:19 +0300 Subject: Prevent a crash if "debug jobengine log" is entered without a log level --- OpenSim/Framework/Monitoring/WorkManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Framework/Monitoring') diff --git a/OpenSim/Framework/Monitoring/WorkManager.cs b/OpenSim/Framework/Monitoring/WorkManager.cs index 134661b..d1a74ce 100644 --- a/OpenSim/Framework/Monitoring/WorkManager.cs +++ b/OpenSim/Framework/Monitoring/WorkManager.cs @@ -267,6 +267,12 @@ namespace OpenSim.Framework.Monitoring } else if (subCommand == "log") { + if (args.Length < 4) + { + MainConsole.Instance.Output("Usage: debug jobengine log "); + return; + } + // int logLevel; int logLevel = int.Parse(args[3]); // if (ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out logLevel)) -- cgit v1.1