From 105b16358fb5a605ba5a7244bbf5cf22ca8975f3 Mon Sep 17 00:00:00 2001 From: EricksOliveira Date: Tue, 25 Mar 2025 09:27:13 -0300 Subject: [PATCH] BG: Crash fix when bots are trying to determine the eye flagcarrier when the battleground no longer exists (#1119) --- src/strategy/values/PvpValues.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/strategy/values/PvpValues.cpp b/src/strategy/values/PvpValues.cpp index 8a497add..84c586c6 100644 --- a/src/strategy/values/PvpValues.cpp +++ b/src/strategy/values/PvpValues.cpp @@ -44,6 +44,9 @@ Unit* FlagCarrierValue::Calculate() { BattlegroundEY* bg = (BattlegroundEY*)botAI->GetBot()->GetBattleground(); + if (!bg) + return nullptr; + if (bg->GetFlagPickerGUID().IsEmpty()) return nullptr;