From 246b5b021dc3f4342c34ab4af850e0318294c4b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Fri, 25 Mar 2022 13:20:50 -0600 Subject: [PATCH] Fix crash in Refresh PlayerbotAI method --- src/RandomPlayerbotMgr.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 750f9ab0..642b0fa2 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1350,6 +1350,9 @@ uint32 RandomPlayerbotMgr::GetZoneLevel(uint16 mapId, float teleX, float teleY, void RandomPlayerbotMgr::Refresh(Player* bot) { PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot); + if (!botAI) + return; + if (bot->isDead()) { bot->ResurrectPlayer(1.0f);