From 2f93eeedc9c4a5bffd3791d759dbf254c681062f Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Fri, 19 Jul 2024 13:43:30 +0800 Subject: [PATCH] [Crash fix] Fix a possible crash --- src/strategy/actions/InviteToGroupAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strategy/actions/InviteToGroupAction.cpp b/src/strategy/actions/InviteToGroupAction.cpp index 0b7b5e8a..8c8bd74b 100644 --- a/src/strategy/actions/InviteToGroupAction.cpp +++ b/src/strategy/actions/InviteToGroupAction.cpp @@ -19,7 +19,7 @@ bool InviteToGroupAction::Execute(Event event) bool InviteToGroupAction::Invite(Player* player) { - if (!player) + if (!player || !player->IsInWorld()) return false; if (!GET_PLAYERBOT_AI(player) && !botAI->GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_INVITE, true, player))