diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index a7daa30246214d..2cc199bd0afa3f 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -483,6 +483,9 @@ class npc_commandscript : public CommandScript if (!player) return false; + if (!player->GetSelectedUnit()) + return false; + Creature* creature = player->GetSelectedUnit()->ToCreature(); if (!creature)