From 166ceb17b22ae4321056dc975573264f0d2d0e96 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 25 Oct 2009 10:22:49 +0000 Subject: [PATCH] can now be NULL, check --- src/util/client.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/util/client.c b/src/util/client.c index d5358cab4..fb4c1c280 100644 --- a/src/util/client.c +++ b/src/util/client.c @@ -221,9 +221,11 @@ finish_cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock) { - GNUNET_assert (sock->sock != NULL); - GNUNET_CONNECTION_destroy (sock->sock); - sock->sock = NULL; + if (sock->sock != NULL) + { + GNUNET_CONNECTION_destroy (sock->sock); + sock->sock = NULL; + } sock->receiver_handler = NULL; if (sock->in_receive == GNUNET_YES) sock->in_receive = GNUNET_SYSERR; -- 2.25.1