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 19af35fa1f2..05686aa9828 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -1070,7 +1070,8 @@ public:
return false;
uint32 animId = atoi((char*)args);
- handler->GetSession()->GetPlayer()->HandleEmoteCommand(animId);
+ if (Unit* unit = handler->getSelectedUnit())
+ unit->HandleEmoteCommand(animId);
return true;
}