fix(Scripts/Scholomance): Fix nullptr crash (#9298)
This commit is contained in:
@@ -296,7 +296,7 @@ public:
|
|||||||
void SpellHitTarget(Unit* target, const SpellInfo* spellinfo) override
|
void SpellHitTarget(Unit* target, const SpellInfo* spellinfo) override
|
||||||
{
|
{
|
||||||
uint32 room = 0;
|
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);
|
room = GetData(GANDLING_ROOM_TO_USE);
|
||||||
SetGate(room, CLOSED);
|
SetGate(room, CLOSED);
|
||||||
|
|||||||
Reference in New Issue
Block a user