From c181e07637404d58fe0022234f61173098387dbf Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 9 Dec 2011 16:09:04 +0000 Subject: [PATCH] fix crash --- src/statistics/statistics_api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index 8e80a4d75..8e453bfd4 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c @@ -679,6 +679,8 @@ transmit_action (void *cls, size_t size, void *buf) size_t ret; handle->th = NULL; + if (NULL == handle->current) + return 0; switch (handle->current->type) { case ACTION_GET: @@ -877,6 +879,7 @@ schedule_action (struct GNUNET_STATISTICS_Handle *h) } GNUNET_CONTAINER_DLL_remove (h->action_head, h->action_tail, h->current); timeout = GNUNET_TIME_absolute_get_remaining (h->current->timeout); + GNUNET_assert (NULL == h->th); if (NULL == (h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, h->current->msize, -- 2.25.1