minor: Only try to deregister stats in EntityTransferModule.RemoveRegion() if module was enabled.

user_profiles
Justin Clark-Casey (justincc) 2013-03-28 02:23:09 +00:00
parent d9c049fd9f
commit afd0d6af07
1 changed files with 7 additions and 4 deletions

View File

@ -256,10 +256,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
public virtual void RemoveRegion(Scene scene) public virtual void RemoveRegion(Scene scene)
{ {
StatsManager.DeregisterStat(m_interRegionTeleportAttempts); if (m_Enabled)
StatsManager.DeregisterStat(m_interRegionTeleportAborts); {
StatsManager.DeregisterStat(m_interRegionTeleportCancels); StatsManager.DeregisterStat(m_interRegionTeleportAttempts);
StatsManager.DeregisterStat(m_interRegionTeleportFailures); StatsManager.DeregisterStat(m_interRegionTeleportAborts);
StatsManager.DeregisterStat(m_interRegionTeleportCancels);
StatsManager.DeregisterStat(m_interRegionTeleportFailures);
}
} }
public virtual void RegionLoaded(Scene scene) public virtual void RegionLoaded(Scene scene)