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)