mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Unlink Battleground and BattlegroundMap when one of them is deleted. Fix crash #3239.
This commit is contained in:
@@ -2593,6 +2593,12 @@ BattlegroundMap::BattlegroundMap(uint32 id, time_t expiry, uint32 InstanceId, Ma
|
||||
|
||||
BattlegroundMap::~BattlegroundMap()
|
||||
{
|
||||
if(m_bg)
|
||||
{
|
||||
//unlink to prevent crash, always unlink all pointer reference before destruction
|
||||
m_bg->SetBgMap(NULL);
|
||||
m_bg = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundMap::InitVisibilityDistance()
|
||||
|
||||
Reference in New Issue
Block a user