aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-09-11 13:38:24 +0000
committerLRN <lrn1986@gmail.com>2013-09-11 13:38:24 +0000
commitb1d1f11b486f00cd62a637b2a9ab4111b4573fc7 (patch)
tree23df67b9fc9f34abc35c88d55879017c133638ca /src/statistics
parent4c9986aa22031fd48ec456eb7c0224c368aad377 (diff)
downloadgnunet-b1d1f11b486f00cd62a637b2a9ab4111b4573fc7.tar.gz
gnunet-b1d1f11b486f00cd62a637b2a9ab4111b4573fc7.zip
Don't cancel if we didn't start watching anything in the first place
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/gnunet-statistics.c5
1 files changed, 3 insertions, 2 deletions
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)
162 162
163 if (NULL == h) 163 if (NULL == h)
164 return; 164 return;
165 GNUNET_assert (GNUNET_OK == 165 if (NULL != subsystem && NULL != name)
166 GNUNET_STATISTICS_watch_cancel (h, subsystem, name, &printer, h)); 166 GNUNET_assert (GNUNET_OK ==
167 GNUNET_STATISTICS_watch_cancel (h, subsystem, name, &printer, h));
167 GNUNET_STATISTICS_destroy (h, GNUNET_NO); 168 GNUNET_STATISTICS_destroy (h, GNUNET_NO);
168 h = NULL; 169 h = NULL;
169} 170}