From 175f2b16f50bfd7998886da4b19c5e70c0dc21be Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Sat, 3 Feb 2024 07:54:34 -0600 Subject: [PATCH] [Bug Fix] Fix for potential crash of DS damage on death (#4040) On the unfortunate timing of a bot or owner dying when the bot deals damage due to a DS and the owner pointer is no longer valid. --- zone/attack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index a0b6c78fd..15b6bdc0c 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -4485,7 +4485,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons if (attacker->IsBot()) { Mob* owner = attacker->GetOwner(); - if (owner->CastToClient()->GetFilter(FilterDamageShields) != FilterHide) { + if (owner && owner->CastToClient()->GetFilter(FilterDamageShields) != FilterHide) { owner->MessageString( Chat::DamageShield, OTHER_HIT_NONMELEE,