treat destroying NULL as no-op

This commit is contained in:
Lee Salzman
2012-09-11 02:28:50 +03:00
parent be852c5d8b
commit 71b7550049
4 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -220,7 +220,8 @@ enet_socket_accept (ENetSocket socket, ENetAddress * address)
void
enet_socket_destroy (ENetSocket socket)
{
closesocket (socket);
if (socket != INVALID_SOCKET)
closesocket (socket);
}
int