From 495269bfa06a42c2a65cd7562fd396668ddd627f Mon Sep 17 00:00:00 2001 From: EricksOliveira Date: Fri, 28 Mar 2025 12:08:40 -0300 Subject: [PATCH] Add possible crash fix when summoning an invalid bot (#1125) --- src/strategy/actions/UseMeetingStoneAction.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/strategy/actions/UseMeetingStoneAction.cpp b/src/strategy/actions/UseMeetingStoneAction.cpp index 5819f2e9..101fd7ec 100644 --- a/src/strategy/actions/UseMeetingStoneAction.cpp +++ b/src/strategy/actions/UseMeetingStoneAction.cpp @@ -217,6 +217,9 @@ bool SummonAction::Teleport(Player* summoner, Player* player) if (bot->isDead() && revive) { + if (!botAI->IsSafe(player) || !botAI->IsSafe(summoner)) + return false; + bot->ResurrectPlayer(1.0f, false); botAI->TellMasterNoFacing("I live, again!"); botAI->GetAiObjectContext()->GetValue("prioritized targets")->Reset();