aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjacopo grandi <jak.sk8@hotmail.it>2021-02-22 16:28:34 +0100
committerjacopo grandi <jak.sk8@hotmail.it>2021-02-22 16:29:15 +0100
commit16bca58803c5ff76de20889bc064f22e5305b9ed (patch)
treea0d154e84071677d1bd76a07fc8e4dc771c1f5a0 /net
parent02c89fceeb915e31b36dd4acb4218ccd913b2ce8 (diff)
blinking cursor and fix net
Diffstat (limited to 'net')
-rw-r--r--net/net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/net.c b/net/net.c
index 4dc79f2..0a2dc98 100644
--- a/net/net.c
+++ b/net/net.c
@@ -117,8 +117,8 @@ int net_client_recv (net_client *c, char buffer[]) {
void net_client_close (net_client *c) {
if (c->socket != NULL) p_socket_close (c->socket, NULL);
- p_socket_address_free (c->addr_server);
- p_socket_free (c->socket);
+ if (c->addr_server != NULL) p_socket_address_free (c->addr_server);
+ if (c->socket != NULL) p_socket_free (c->socket);
}