From: Christian Grothoff Date: Sat, 17 Dec 2011 19:02:42 +0000 (+0000) Subject: -another stats crash X-Git-Tag: initial-import-from-subversion-38251~15596 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9705390d829124a3b7d556a901cd4bca7bfff5d0;p=oweals%2Fgnunet.git -another stats crash --- diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index 557694cfb..ca435a371 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c @@ -333,8 +333,11 @@ do_disconnect (struct GNUNET_STATISTICS_Handle *h) GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); h->th = NULL; } - GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); - h->client = NULL; + if (NULL != h->client) + { + GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); + h->client = NULL; + } h->receiving = GNUNET_NO; if (NULL != (c = h->current)) {