mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
Handle case when ClientNetworkGameSocketHandler::SendChat is called after connection closed
This commit is contained in:
parent
f37a93cecd
commit
2740537632
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user