[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.
This commit is contained in:
nytmyr 2024-02-03 07:54:34 -06:00 committed by GitHub
parent 71f47dbcef
commit 175f2b16f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,