diff --git a/src/game/server/neo/bot/neo_bot.cpp b/src/game/server/neo/bot/neo_bot.cpp index 8390df1cf8..9a8dae1649 100644 --- a/src/game/server/neo/bot/neo_bot.cpp +++ b/src/game/server/neo/bot/neo_bot.cpp @@ -1915,6 +1915,12 @@ void CNEOBot::RepathIfFriendlyBlockingLineOfFire() return; } + const PathFollower* pPath = GetCurrentPath(); + if (!pPath) + { + return; + } + if (!m_repathAroundFriendlyTimer.IsElapsed()) { return; @@ -1932,7 +1938,6 @@ void CNEOBot::RepathIfFriendlyBlockingLineOfFire() if (!IsLineOfFireClearOfFriendlies(eyePos, targetPos)) { - const PathFollower* pPath = GetCurrentPath(); Vector goal = pPath->GetEndPosition(); CNEOBotPathCost cost(this, SAFEST_ROUTE);