diff options
author | Mattes D <github@xoft.cz> | 2014-05-31 19:11:13 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-05-31 19:11:13 +0200 |
commit | 6de45037c774f5fc748a4520b6f2afacdca94661 (patch) | |
tree | dc5908fdb33d679c05f10aa562ccbb107e7f3518 /src/Protocol/Protocol17x.cpp | |
parent | Merge pull request #951 from worktycho/chunksparsing/structs (diff) | |
parent | Updated PlainsVillage prefabs. (diff) | |
download | cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.gz cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.bz2 cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.lz cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.xz cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.zst cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.zip |
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 7c526d103..f7564fe6d 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -234,7 +234,8 @@ void cProtocol172::SendChat(const cCompositeChat & a_Message) // Compose the complete Json string to send: Json::Value msg; - msg["text"] = cClientHandle::FormatMessageType(m_Client->GetPlayer()->GetWorld()->ShouldUseChatPrefixes(), a_Message.GetMessageType(), a_Message.GetAdditionalMessageTypeData()); // The client crashes without this field being present + cWorld * World = m_Client->GetPlayer()->GetWorld(); + msg["text"] = cClientHandle::FormatMessageType((World == NULL) ? false : World->ShouldUseChatPrefixes(), a_Message.GetMessageType(), a_Message.GetAdditionalMessageTypeData()); // The client crashes without this field being present const cCompositeChat::cParts & Parts = a_Message.GetParts(); for (cCompositeChat::cParts::const_iterator itr = Parts.begin(), end = Parts.end(); itr != end; ++itr) { |