aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorModoX <moardox@gmail.com>2024-08-03 01:20:55 +0200
committerModoX <moardox@gmail.com>2024-08-03 01:20:55 +0200
commitc3f1424d7051619a00a3ca611eccca16c216848a (patch)
treec4c631d3cdb54e10b25a43556bec7b2e6efd4784 /src
parent465dfc10edd0896473e9da018ca3754ea1a289c9 (diff)
Scripts/AtalDazar: Fix possible crashes
Diffstat (limited to 'src')
-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