Scripts/AzjolNerub: Missing nullptr check in Hadronox. Closes #21258.

This commit is contained in:
Treeston
2018-01-18 16:47:31 +01:00
committed by Aokromes
parent ae8616bd52
commit 7997bebf9e

View File

@@ -366,7 +366,7 @@ public:
// Safeguard to prevent Hadronox dying to NPCs
void DamageTaken(Unit* who, uint32& damage) override
{
if (!who->IsControlledByPlayer() && me->HealthBelowPct(70))
if ((!who || !who->IsControlledByPlayer()) && me->HealthBelowPct(70))
{
if (me->HealthBelowPctDamaged(5, damage))
damage = 0;