From 15c79a3f1628856b0e55e37190e863a2bfa5492c Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 28 Mar 2013 02:23:09 +0000 Subject: [PATCH] minor: Only try to deregister stats in EntityTransferModule.RemoveRegion() if module was enabled. --- .../Framework/EntityTransfer/EntityTransferModule.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 91421bcfc4..fe94cb1a3d 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -253,10 +253,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer public virtual void RemoveRegion(Scene scene) { - StatsManager.DeregisterStat(m_interRegionTeleportAttempts); - StatsManager.DeregisterStat(m_interRegionTeleportAborts); - StatsManager.DeregisterStat(m_interRegionTeleportCancels); - StatsManager.DeregisterStat(m_interRegionTeleportFailures); + if (m_Enabled) + { + StatsManager.DeregisterStat(m_interRegionTeleportAttempts); + StatsManager.DeregisterStat(m_interRegionTeleportAborts); + StatsManager.DeregisterStat(m_interRegionTeleportCancels); + StatsManager.DeregisterStat(m_interRegionTeleportFailures); + } } public virtual void RegionLoaded(Scene scene)