- do not call statistics when some peers are NULL
authorSree Harsha Totakura <totakura@in.tum.de>
Wed, 20 Mar 2013 10:18:40 +0000 (10:18 +0000)
committerSree Harsha Totakura <totakura@in.tum.de>
Wed, 20 Mar 2013 10:18:40 +0000 (10:18 +0000)
src/testbed/testbed_api_statistics.c

index dac468232409de93f888169f6184705e6fd7e861..ec0f126b15ac3fcc5a02944a468a4ce490ef6040 100644 (file)
@@ -332,6 +332,8 @@ opstart_get_stats (void *cls)
                            sizeof (struct GNUNET_TESTBED_Operation *));
   for (peer = 0; peer < sc->num_peers; peer++)
   {
+    if (NULL == sc->peers[peer])
+      continue;
     peer_sc = GNUNET_malloc (sizeof (struct PeerGetStatsContext));
     peer_sc->sc = sc;
     peer_sc->peer_index = peer;