Handle case when ClientNetworkGameSocketHandler::SendChat is called after connection closed

This commit is contained in:
Jonathan G Rennison 2019-05-18 20:34:43 +01:00
parent f37a93cecd
commit 2740537632

View File

@ -446,6 +446,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendCommand(const CommandPacke
/** Send a chat-packet over the network */
NetworkRecvStatus ClientNetworkGameSocketHandler::SendChat(NetworkAction action, DestType type, int dest, const char *msg, NetworkTextMessageData data)
{
if (!my_client) return NETWORK_RECV_STATUS_CONN_LOST;
Packet *p = new Packet(PACKET_CLIENT_CHAT);
p->Send_uint8 (action);