mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 14:42:24 +01:00
Make Connection::Send cancel silently if peer doesn't exist.
This commit is contained in:
parent
63f1ded167
commit
faf3d7902a
@ -1121,7 +1121,9 @@ void Connection::Send(u16 peer_id, u8 channelnum,
|
|||||||
{
|
{
|
||||||
assert(channelnum < CHANNEL_COUNT);
|
assert(channelnum < CHANNEL_COUNT);
|
||||||
|
|
||||||
Peer *peer = GetPeer(peer_id);
|
Peer *peer = GetPeerNoEx(peer_id);
|
||||||
|
if(peer == NULL)
|
||||||
|
return;
|
||||||
Channel *channel = &(peer->channels[channelnum]);
|
Channel *channel = &(peer->channels[channelnum]);
|
||||||
|
|
||||||
u32 chunksize_max = m_max_packet_size - BASE_HEADER_SIZE;
|
u32 chunksize_max = m_max_packet_size - BASE_HEADER_SIZE;
|
||||||
|
Loading…
Reference in New Issue
Block a user