mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 14:05:28 +00:00
fix(Core/Scripts): missing null checks for GetCharmerOrOwner and GetOwner (#24902)
This commit is contained in:
@@ -2674,7 +2674,8 @@ struct npc_controller : public PossessedAI
|
||||
{
|
||||
if (!apply)
|
||||
{
|
||||
me->GetCharmerOrOwner()->InterruptNonMeleeSpells(false);
|
||||
if (Unit* charmerOrOwner = me->GetCharmerOrOwner())
|
||||
charmerOrOwner->InterruptNonMeleeSpells(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user