From: LRN Date: Wed, 11 Sep 2013 13:38:24 +0000 (+0000) Subject: Don't cancel if we didn't start watching anything in the first place X-Git-Tag: initial-import-from-subversion-38251~7386 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b1d1f11b486f00cd62a637b2a9ab4111b4573fc7;p=oweals%2Fgnunet.git Don't cancel if we didn't start watching anything in the first place --- diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index b1a447cf3..2de58a070 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c @@ -162,8 +162,9 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if (NULL == h) return; - GNUNET_assert (GNUNET_OK == - GNUNET_STATISTICS_watch_cancel (h, subsystem, name, &printer, h)); + if (NULL != subsystem && NULL != name) + GNUNET_assert (GNUNET_OK == + GNUNET_STATISTICS_watch_cancel (h, subsystem, name, &printer, h)); GNUNET_STATISTICS_destroy (h, GNUNET_NO); h = NULL; }