fix(Scripts/SI): crash fix (#22744)

This commit is contained in:
Andrew 2025-08-29 00:43:36 -03:00 committed by GitHub
parent 7756b41160
commit c2b298eaac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -499,7 +499,7 @@ struct npc_necrotic_shard : public ScriptedAI
// Only Minions and the shard itself can deal damage.
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType /*damageType*/, SpellSchoolMask /*damageSchoolMask*/) override
{
if (attacker->GetFactionTemplateEntry() != me->GetFactionTemplateEntry())
if (attacker && attacker->GetFactionTemplateEntry() != me->GetFactionTemplateEntry())
damage = 0;
}