aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/statistics/statistics_api.c7
1 files 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)
333 GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); 333 GNUNET_CLIENT_notify_transmit_ready_cancel (h->th);
334 h->th = NULL; 334 h->th = NULL;
335 } 335 }
336 GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); 336 if (NULL != h->client)
337 h->client = NULL; 337 {
338 GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
339 h->client = NULL;
340 }
338 h->receiving = GNUNET_NO; 341 h->receiving = GNUNET_NO;
339 if (NULL != (c = h->current)) 342 if (NULL != (c = h->current))
340 { 343 {