aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoreihrul <eihrul>2010-05-14 22:28:38 +0000
committereihrul <eihrul>2010-05-14 22:28:38 +0000
commit94a1e8879fd98719fcac0ba28df84c5b72d52178 (patch)
treef0eb85331cd4b551fee7011e57b02ad18fcb9d18
parentc5189c090fc47503790bcb994232629897d61d7c (diff)
downloadenet-94a1e8879fd98719fcac0ba28df84c5b72d52178.tar.gz
enet-94a1e8879fd98719fcac0ba28df84c5b72d52178.zip
enet_peer_receive channelID fix
-rw-r--r--peer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/peer.c b/peer.c
index f9d93e7..395a902 100644
--- a/peer.c
+++ b/peer.c
@@ -218,7 +218,8 @@ enet_peer_receive (ENetPeer * peer, enet_uint8 * channelID)
incomingCommand = (ENetIncomingCommand *) enet_list_remove (enet_list_begin (& peer -> dispatchedCommands));
- * channelID = incomingCommand -> command.header.channelID;
+ if (channelID != NULL)
+ * channelID = incomingCommand -> command.header.channelID;
packet = incomingCommand -> packet;