aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/scripts/Zandalar/AtalDazar/boss_rezan.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/scripts/Zandalar/AtalDazar/boss_rezan.cpp b/src/server/scripts/Zandalar/AtalDazar/boss_rezan.cpp
index e23d8194c30..6628236a818 100644
--- a/src/server/scripts/Zandalar/AtalDazar/boss_rezan.cpp
+++ b/src/server/scripts/Zandalar/AtalDazar/boss_rezan.cpp
@@ -218,7 +218,8 @@ class spell_rezan_devour : public AuraScript
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- GetCaster()->RemoveAura(SPELL_RIDE_VEHICLE);
+ if (Unit* caster = GetCaster())
+ caster->RemoveAura(SPELL_RIDE_VEHICLE);
}
void Register() override
@@ -237,7 +238,8 @@ class spell_rezan_pursuit : public AuraScript
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
- GetCaster()->CastSpell(GetTarget(), SPELL_REVERSE_CAST_RIDE_VEHICLE, true);
+ if (Unit* caster = GetCaster())
+ caster->CastSpell(GetTarget(), SPELL_REVERSE_CAST_RIDE_VEHICLE, true);
}
void Register() override