diff options
author | LRN <lrn1986@gmail.com> | 2013-09-11 13:38:24 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-09-11 13:38:24 +0000 |
commit | b1d1f11b486f00cd62a637b2a9ab4111b4573fc7 (patch) | |
tree | 23df67b9fc9f34abc35c88d55879017c133638ca /src | |
parent | 4c9986aa22031fd48ec456eb7c0224c368aad377 (diff) | |
download | gnunet-b1d1f11b486f00cd62a637b2a9ab4111b4573fc7.tar.gz gnunet-b1d1f11b486f00cd62a637b2a9ab4111b4573fc7.zip |
Don't cancel if we didn't start watching anything in the first place
Diffstat (limited to 'src')
-rw-r--r-- | src/statistics/gnunet-statistics.c | 5 |
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 | } |