diff options
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -20,6 +20,8 @@ ENetPacket * enet_packet_create (const void * data, size_t dataLength, enet_uint32 flags) { ENetPacket * packet = (ENetPacket *) enet_malloc (sizeof (ENetPacket)); + if (packet == NULL) + return NULL; if (flags & ENET_PACKET_FLAG_NO_ALLOCATE) packet -> data = (enet_uint8 *) data; |