From: Matthias Wachs Date: Wed, 18 Apr 2012 13:49:05 +0000 (+0000) Subject: fix 2273 X-Git-Tag: initial-import-from-subversion-38251~13894 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b8156b15d817bb2ae518777b749a231e9d7cc1a3;p=oweals%2Fgnunet.git fix 2273 --- diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index c0b978f70..253e59737 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c @@ -281,6 +281,8 @@ schedule_watch_request (struct GNUNET_STATISTICS_Handle *h, size_t nsize; GNUNET_assert (h != NULL); + GNUNET_assert (watch != NULL); + slen = strlen (watch->subsystem) + 1; nlen = strlen (watch->name) + 1; nsize = sizeof (struct GNUNET_MessageHeader) + slen + nlen; @@ -382,7 +384,10 @@ try_connect (struct GNUNET_STATISTICS_Handle *h) } } for (i = 0; i < h->watches_size; i++) - schedule_watch_request (h, h->watches[i]); + { + if (NULL != h->watches[i]) + schedule_watch_request (h, h->watches[i]); + } return GNUNET_YES; } LOG (GNUNET_ERROR_TYPE_DEBUG,