diff --git a/src/game/BattleGround/BattleGroundMgr.h b/src/game/BattleGround/BattleGroundMgr.h index ce3b2950c6..5ac8193441 100644 --- a/src/game/BattleGround/BattleGroundMgr.h +++ b/src/game/BattleGround/BattleGroundMgr.h @@ -61,7 +61,7 @@ class BattleGroundMgr uint32 CreateBattleGround(BattleGroundTypeId /*bgTypeId*/, uint32 /*minPlayersPerTeam*/, uint32 /*maxPlayersPerTeam*/, uint32 /*levelMin*/, uint32 /*levelMax*/, char const* /*battleGroundName*/, uint32 /*mapId*/, float /*team1StartLocX*/, float /*team1StartLocY*/, float /*team1StartLocZ*/, float /*team1StartLocO*/, float /*team2StartLocX*/, float /*team2StartLocY*/, float /*team2StartLocZ*/, float /*team2StartLocO*/, float /*startMaxDist*/, uint32 /*playerSkinReflootId*/); - void AddBattleGround(uint32 instanceId, BattleGroundTypeId bgTypeId, BattleGround* bg);; + void AddBattleGround(uint32 instanceId, BattleGroundTypeId bgTypeId, BattleGround* bg); void RemoveBattleGround(uint32 instanceId, BattleGroundTypeId bgTypeId) { m_battleGrounds[bgTypeId].erase(instanceId); } void CreateInitialBattleGrounds(); diff --git a/src/game/Maps/Map.cpp b/src/game/Maps/Map.cpp index 5006b220a7..2e4de48509 100644 --- a/src/game/Maps/Map.cpp +++ b/src/game/Maps/Map.cpp @@ -2055,6 +2055,9 @@ void BattleGroundMap::Update(const uint32& diff) { Map::Update(diff); + if (!m_bg) + return; + if (!m_bg->GetPlayersSize()) { // BG is empty