Crash fix for teleport action (#1245)

* - Crash fix for teleport action

* - Revert logic
This commit is contained in:
kadeshar
2025-04-27 12:39:14 +02:00
committed by GitHub
parent ca4897360f
commit 96d9b346c1

View File

@@ -75,7 +75,7 @@ bool TeleportAction::Execute(Event event)
uint32 spellId = goInfo->spellcaster.spellId;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo->HasEffect(SPELL_EFFECT_TELEPORT_UNITS))
if (!spellInfo || !spellInfo->HasEffect(SPELL_EFFECT_TELEPORT_UNITS))
continue;
std::ostringstream out;