diff --git a/src/strategy/values/PvpValues.cpp b/src/strategy/values/PvpValues.cpp index 84c586c6..a72b804a 100644 --- a/src/strategy/values/PvpValues.cpp +++ b/src/strategy/values/PvpValues.cpp @@ -21,6 +21,9 @@ Unit* FlagCarrierValue::Calculate() { BattlegroundWS* bg = (BattlegroundWS*)botAI->GetBot()->GetBattleground(); + if (!bg) + return nullptr; + if ((!sameTeam && bot->GetTeamId() == TEAM_HORDE || (sameTeam && bot->GetTeamId() == TEAM_ALLIANCE)) && !bg->GetFlagPickerGUID(TEAM_HORDE).IsEmpty()) carrier = ObjectAccessor::GetPlayer(bg->GetBgMap(), bg->GetFlagPickerGUID(TEAM_HORDE));