diff --git a/source/enet/peer.c b/source/enet/peer.c index f9d93e77..395a9027 100755 --- a/source/enet/peer.c +++ b/source/enet/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;