From 7c872915ec1e1ad6ab936233562771db1c6cd549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Thu, 16 Mar 2023 11:18:23 -0600 Subject: [PATCH] Fix crash when RandomBotSayWithoutMaster set to 1 --- src/PlayerbotAI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index eb79c0c0..0ed02a71 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -1479,7 +1479,7 @@ bool PlayerbotAI::TellMaster(std::ostringstream& stream, PlayerbotSecurityLevel bool PlayerbotAI::TellMaster(std::string const text, PlayerbotSecurityLevel securityLevel) { - if (!TellMasterNoFacing(text, securityLevel)) + if (!master || !TellMasterNoFacing(text, securityLevel)) return false; if (!bot->isMoving() && !bot->IsInCombat() && bot->GetMapId() == master->GetMapId() && !bot->HasUnitState(UNIT_STATE_IN_FLIGHT) && !bot->IsFlying())