Scripts/Ulduar: Fix crash

Change an assert to a NULL check on Flame Leviathan vehicle kit, it can be NULL on map unload.
Close #16662

(cherry picked from commit 31cd082833926539c56569ff6faabc139f5f3223)
This commit is contained in:
jackpoz
2016-04-08 20:38:09 +02:00
committed by Shauren
parent 430698d203
commit 8046d5a94f
@@ -334,7 +334,8 @@ class boss_flame_leviathan : public CreatureScript
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_START_THE_ENGINE)
ASSERT_NOTNULL(me->GetVehicleKit())->InstallAllAccessories(false);
if (Vehicle* vehicleKit = me->GetVehicleKit())
vehicleKit->InstallAllAccessories(false);
if (spell->Id == SPELL_ELECTROSHOCK)
me->InterruptSpell(CURRENT_CHANNELED_SPELL);