From 71b75500495d5e11ba5fbe937e421b349d3d3059 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Tue, 11 Sep 2012 02:28:50 +0300 Subject: treat destroying NULL as no-op --- host.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'host.c') diff --git a/host.c b/host.c index ec8731d..33c808a 100644 --- a/host.c +++ b/host.c @@ -135,6 +135,9 @@ enet_host_destroy (ENetHost * host) { ENetPeer * currentPeer; + if (host == NULL) + return; + enet_socket_destroy (host -> socket); for (currentPeer = host -> peers; -- cgit v1.2.3