aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/statistics_api.c7
1 files changed, 6 insertions, 1 deletions
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,
281 size_t nsize; 281 size_t nsize;
282 282
283 GNUNET_assert (h != NULL); 283 GNUNET_assert (h != NULL);
284 GNUNET_assert (watch != NULL);
285
284 slen = strlen (watch->subsystem) + 1; 286 slen = strlen (watch->subsystem) + 1;
285 nlen = strlen (watch->name) + 1; 287 nlen = strlen (watch->name) + 1;
286 nsize = sizeof (struct GNUNET_MessageHeader) + slen + nlen; 288 nsize = sizeof (struct GNUNET_MessageHeader) + slen + nlen;
@@ -382,7 +384,10 @@ try_connect (struct GNUNET_STATISTICS_Handle *h)
382 } 384 }
383 } 385 }
384 for (i = 0; i < h->watches_size; i++) 386 for (i = 0; i < h->watches_size; i++)
385 schedule_watch_request (h, h->watches[i]); 387 {
388 if (NULL != h->watches[i])
389 schedule_watch_request (h, h->watches[i]);
390 }
386 return GNUNET_YES; 391 return GNUNET_YES;
387 } 392 }
388 LOG (GNUNET_ERROR_TYPE_DEBUG, 393 LOG (GNUNET_ERROR_TYPE_DEBUG,