BG Crash fixes

This commit is contained in:
郑佩茹
2022-09-26 10:56:43 -06:00
parent f88f49471a
commit 0a62ee0041
4 changed files with 9 additions and 4 deletions

View File

@@ -539,7 +539,7 @@ void RandomPlayerbotMgr::CheckBgQueue()
else
BgPlayers[queueTypeId][bracketId][teamId]++;
if (!player->IsInvitedForBattlegroundInstance() && (!player->InBattleground() || player->GetBattleground()->GetBgTypeID() != BattlegroundMgr::BGTemplateId(queueTypeId)))
if (!player->IsInvitedForBattlegroundInstance() && (!player->InBattleground() || (player->GetBattleground() && player->GetBattleground()->GetBgTypeID() != BattlegroundMgr::BGTemplateId(queueTypeId))))
{
if (BattlegroundMgr::BGArenaType(queueTypeId))
{