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
This commit is contained in:
jackpoz
2016-02-27 12:02:32 +01:00
parent 8267e493d1
commit 31cd082833

View File

@@ -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);