summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/connection.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/connection.cpp b/src/connection.cpp
index 548a7f532..89cb7dd0b 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -1121,7 +1121,9 @@ void Connection::Send(u16 peer_id, u8 channelnum,
{
assert(channelnum < CHANNEL_COUNT);
- Peer *peer = GetPeer(peer_id);
+ Peer *peer = GetPeerNoEx(peer_id);
+ if(peer == NULL)
+ return;
Channel *channel = &(peer->channels[channelnum]);
u32 chunksize_max = m_max_packet_size - BASE_HEADER_SIZE;