more fs cadet interaction fixes
authorChristian Grothoff <christian@grothoff.org>
Tue, 19 Feb 2019 10:38:19 +0000 (11:38 +0100)
committerChristian Grothoff <christian@grothoff.org>
Tue, 19 Feb 2019 10:38:19 +0000 (11:38 +0100)
src/fs/gnunet-service-fs_cadet_client.c

index e6ece4346f1902b4b2a7428a0ef12ee826074eb3..900600096f04ba854b4c883dd583515f00957f4a 100644 (file)
@@ -469,8 +469,11 @@ reset_cadet (struct CadetHandle *mh)
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Resetting cadet channel to %s\n",
              GNUNET_i2s (&mh->target));
-  GNUNET_CADET_channel_destroy (mh->channel);
-  mh->channel = NULL;
+  if (NULL != mh->channel)
+  {
+    GNUNET_CADET_channel_destroy (mh->channel);
+    mh->channel = NULL;
+  }
   GNUNET_CONTAINER_multihashmap_iterate (mh->waiting_map,
                                         &move_to_pending,
                                         mh);