From 71862f34b6e97e19fceefd9ccb813ce09ef0a0c3 Mon Sep 17 00:00:00 2001 From: teravus Date: Thu, 14 Feb 2013 18:52:11 -0500 Subject: * Handle null check on configs in module startup so that the the code can be run on 'stop on handled and unhandled null reference exceptions' mode without pausing during startup a bunch of times. I don't think exceptions were really meant for replacing a single if statement... --- .../CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/Framework/Statistics') diff --git a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs index fb74cc6..f3436d1 100644 --- a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs @@ -57,7 +57,7 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging try { IConfig statConfig = source.Configs["Statistics.Binary"]; - if (statConfig.Contains("enabled") && statConfig.GetBoolean("enabled")) + if (statConfig != null && statConfig.Contains("enabled") && statConfig.GetBoolean("enabled")) { if (statConfig.Contains("collect_region_stats")) { -- cgit v1.1