Browse Source

Add null check for peers in the selective broadcast

NX 7 years ago
parent
commit
432d622a28
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Native/enet.h

+ 1 - 1
Source/Native/enet.h

@@ -4213,7 +4213,7 @@ extern "C" {
     void enet_host_broadcast_selective(ENetHost *host, enet_uint8 channelID, ENetPacket *packet, ENetPeer *peers, size_t length) {
     void enet_host_broadcast_selective(ENetHost *host, enet_uint8 channelID, ENetPacket *packet, ENetPeer *peers, size_t length) {
         ENetPeer *currentPeer;
         ENetPeer *currentPeer;
 
 
-        if (host == NULL) {
+        if (host == NULL || peers == NULL) {
             return;
             return;
         }
         }