From: Christian Grothoff Date: Mon, 22 Aug 2016 13:22:49 +0000 (+0000) Subject: -fix NPE X-Git-Tag: initial-import-from-subversion-38251~361 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6aba3a8920b721732c32f1722b49971005fa94de;p=oweals%2Fgnunet.git -fix NPE --- diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index f72c8525b..5ba78521c 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c @@ -921,7 +921,8 @@ GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, return; GNUNET_assert (GNUNET_NO == h->do_destroy); /* Don't call twice. */ if ( (sync_first) && - (0 != GNUNET_MQ_get_length (h->mq)) && + (NULL != h->mq) && + (0 != GNUNET_MQ_get_length (h->mq)) (GNUNET_YES == try_connect (h)) ) { if ( (NULL != h->current) &&