Skip to content

Commit b157da4

Browse files
committed
Fix crash
1 parent ab4ca50 commit b157da4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/game/BattleGround/BattleGroundMgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class BattleGroundMgr
6161

6262
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*/);
6363

64-
void AddBattleGround(uint32 instanceId, BattleGroundTypeId bgTypeId, BattleGround* bg);;
64+
void AddBattleGround(uint32 instanceId, BattleGroundTypeId bgTypeId, BattleGround* bg);
6565
void RemoveBattleGround(uint32 instanceId, BattleGroundTypeId bgTypeId) { m_battleGrounds[bgTypeId].erase(instanceId); }
6666

6767
void CreateInitialBattleGrounds();

src/game/Maps/Map.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,6 +2055,9 @@ void BattleGroundMap::Update(const uint32& diff)
20552055
{
20562056
Map::Update(diff);
20572057

2058+
if (!m_bg)
2059+
return;
2060+
20582061
if (!m_bg->GetPlayersSize())
20592062
{
20602063
// BG is empty

0 commit comments

Comments
 (0)