aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index a1a60befd9f..3a98e8ed172 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -1045,7 +1045,8 @@ public:
return false;
uint32 animId = atoi((char*)args);
- handler->GetSession()->GetPlayer()->HandleEmoteCommand(animId);
+ if (Unit* unit = handler->getSelectedUnit())
+ unit->HandleEmoteCommand(animId);
return true;
}