Unlink Battleground and BattlegroundMap when one of them is deleted. Fix crash #3239.
This commit is contained in:
1 parent
5f043e6291
commit
eb946691c7
2 files changed
+11
No files matched your search
@@ -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