fix(Scripts/Scholomance): Fix nullptr crash (#9298)
This commit is contained in:
parent
a0002afe07
commit
53e9759014
1 changed files with 1 additions and 1 deletions
|
|
@ -296,7 +296,7 @@ public:
|
|||
void SpellHitTarget(Unit* target, const SpellInfo* spellinfo) override
|
||||
{
|
||||
uint32 room = 0;
|
||||
if (spellinfo && spellinfo->Id == SPELL_SHADOW_PORTAL)
|
||||
if (spellinfo && spellinfo->Id == SPELL_SHADOW_PORTAL && target && me->GetVictim())
|
||||
{
|
||||
room = GetData(GANDLING_ROOM_TO_USE);
|
||||
SetGate(room, CLOSED);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue