Handle case when ClientNetworkGameSocketHandler::SendChat is called after connection closed
This commit is contained in:
@@ -446,6 +446,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendCommand(const CommandPacke
|
|||||||
/** Send a chat-packet over the network */
|
/** Send a chat-packet over the network */
|
||||||
NetworkRecvStatus ClientNetworkGameSocketHandler::SendChat(NetworkAction action, DestType type, int dest, const char *msg, NetworkTextMessageData data)
|
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);
|
Packet *p = new Packet(PACKET_CLIENT_CHAT);
|
||||||
|
|
||||||
p->Send_uint8 (action);
|
p->Send_uint8 (action);
|
||||||
|
Reference in New Issue
Block a user