From 437f18bc4149517d169bf1abd8295b9be28abbb1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 19 Mar 2012 21:43:23 +0000 Subject: Stop console command "xengine status" throwing an exception if there are no scripts in a region. Addresses http://opensimulator.org/mantis/view.php?id=5940 --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/XEngine') diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index d4108d7..7712076 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -401,16 +401,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine // sb.AppendFormat("Assemblies loaded : {0}\n", m_Assemblies.Count); SensorRepeat sr = AsyncCommandManager.GetSensorRepeatPlugin(this); - sb.AppendFormat("Sensors : {0}\n", sr.SensorsCount); + sb.AppendFormat("Sensors : {0}\n", sr != null ? sr.SensorsCount : 0); Dataserver ds = AsyncCommandManager.GetDataserverPlugin(this); - sb.AppendFormat("Dataserver requests : {0}\n", ds.DataserverRequestsCount); + sb.AppendFormat("Dataserver requests : {0}\n", ds != null ? ds.DataserverRequestsCount : 0); Timer t = AsyncCommandManager.GetTimerPlugin(this); - sb.AppendFormat("Timers : {0}\n", t.TimersCount); + sb.AppendFormat("Timers : {0}\n", t != null ? t.TimersCount : 0); Listener l = AsyncCommandManager.GetListenerPlugin(this); - sb.AppendFormat("Listeners : {0}\n", l.ListenerCount); + sb.AppendFormat("Listeners : {0}\n", l != null ? l.ListenerCount : 0); return sb.ToString(); } -- cgit v1.1