aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/statistics_api.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c
index 48b038cfe..523b9eb5f 100644
--- a/src/statistics/statistics_api.c
+++ b/src/statistics/statistics_api.c
@@ -556,6 +556,7 @@ GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h,
556 h->action_tail = NULL; 556 h->action_tail = NULL;
557 } 557 }
558 } 558 }
559 h->do_destroy = GNUNET_YES;
559 if ( (h->current != NULL) && 560 if ( (h->current != NULL) &&
560 (h->th == NULL) ) 561 (h->th == NULL) )
561 { 562 {
@@ -567,8 +568,8 @@ GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h,
567 &transmit_action, h); 568 &transmit_action, h);
568 GNUNET_assert (NULL != h->th); 569 GNUNET_assert (NULL != h->th);
569 } 570 }
570 h->do_destroy = GNUNET_YES; 571 if (h->th != NULL)
571 return; 572 return;
572 } 573 }
573 if (NULL != h->th) 574 if (NULL != h->th)
574 { 575 {