Skip to content

Commit

Permalink
fix(Scripts/Commands): Fix crash when using npc set origin faction wi… (
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyeriah authored Nov 12, 2024
1 parent dffdb63 commit f8d53d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/scripts/Commands/cs_npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f8d53d4

Please sign in to comment.