From a3915679e1688d27064d23668d8e9896d901302f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Fri, 21 Jun 2024 15:36:05 +0200 Subject: [PATCH] fix player death crash --- src/NeedsSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NeedsSystem.cpp b/src/NeedsSystem.cpp index 378e0b8..d185f70 100644 --- a/src/NeedsSystem.cpp +++ b/src/NeedsSystem.cpp @@ -260,7 +260,7 @@ public: void OnPlayerJustDied(Player* player) override { - if (!NeedsEnabled || !player->IsInWorld()) + if (!NeedsEnabled || !player->IsInWorld() || !player->IsAlive() || !player->GetSession() || player->GetSession()->IsBot()) { return; }