aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/ChatHandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp
index 6b41e8adbd0..bf1c1add8a6 100644
--- a/src/game/ChatHandler.cpp
+++ b/src/game/ChatHandler.cpp
@@ -589,7 +589,7 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE, text_emote, 0, unit);
//Send scripted event call
- if (unit->GetTypeId()==TYPEID_UNIT && Script)
+ if (unit && unit->GetTypeId()==TYPEID_UNIT && Script)
Script->ReceiveEmote(GetPlayer(),(Creature*)unit,text_emote);
}