From 94a1e8879fd98719fcac0ba28df84c5b72d52178 Mon Sep 17 00:00:00 2001 From: eihrul Date: Fri, 14 May 2010 22:28:38 +0000 Subject: [PATCH] enet_peer_receive channelID fix --- peer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;