-another stats crash
authorChristian Grothoff <christian@grothoff.org>
Sat, 17 Dec 2011 19:02:42 +0000 (19:02 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 17 Dec 2011 19:02:42 +0000 (19:02 +0000)
src/statistics/statistics_api.c

index 557694cfb5cdd056b7593f47d914336d7d5bd60e..ca435a3713dbe965b3fcc9a7e1aab449e6b79209 100644 (file)
@@ -333,8 +333,11 @@ do_disconnect (struct GNUNET_STATISTICS_Handle *h)
     GNUNET_CLIENT_notify_transmit_ready_cancel (h->th);
     h->th = NULL;
   } 
-  GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
-  h->client = NULL;
+  if (NULL != h->client)
+  {
+    GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+    h->client = NULL;
+  }
   h->receiving = GNUNET_NO;
   if (NULL != (c = h->current))
   {