From b1d1f11b486f00cd62a637b2a9ab4111b4573fc7 Mon Sep 17 00:00:00 2001 From: LRN Date: Wed, 11 Sep 2013 13:38:24 +0000 Subject: Don't cancel if we didn't start watching anything in the first place --- src/statistics/gnunet-statistics.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/statistics/gnunet-statistics.c') 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; } -- cgit v1.2.3