From 9705390d829124a3b7d556a901cd4bca7bfff5d0 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 17 Dec 2011 19:02:42 +0000 Subject: [PATCH] -another stats crash --- src/statistics/statistics_api.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)) { -- 2.25.1