HGWorldMapModule: unregister event on RemoveRegion

TeleportWork
Diva Canto 2013-07-31 11:20:27 -07:00
parent 87fcff9fc3
commit ac2ad9690d
1 changed files with 10 additions and 1 deletions

View File

@ -82,7 +82,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
base.AddRegion(scene);
scene.EventManager.OnClientClosed += new EventManager.ClientClosed(EventManager_OnClientClosed);
scene.EventManager.OnClientClosed += EventManager_OnClientClosed;
}
public override void RegionLoaded(Scene scene)
@ -99,6 +99,15 @@ namespace OpenSim.Region.CoreModules.Hypergrid
m_UserManagement = m_scene.RequestModuleInterface<IUserManagement>();
}
public override void RemoveRegion(Scene scene)
{
if (!m_Enabled)
return;
scene.EventManager.OnClientClosed -= EventManager_OnClientClosed;
}
public override string Name
{
get { return "HGWorldMap"; }