projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63f1ded
)
Make Connection::Send cancel silently if peer doesn't exist.
author
Perttu Ahola
<celeron55@gmail.com>
Tue, 6 Sep 2011 16:39:23 +0000
(19:39 +0300)
committer
Perttu Ahola
<celeron55@gmail.com>
Tue, 6 Sep 2011 16:39:23 +0000
(19:39 +0300)
src/connection.cpp
patch
|
blob
|
history
diff --git
a/src/connection.cpp
b/src/connection.cpp
index 548a7f532fa58ddb483ad7eb9e04d69523f3730b..89cb7dd0b3dd8aad8298e3e331a441038056ee63 100644
(file)
--- 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;