From: Christian Grothoff Date: Thu, 22 Jul 2010 11:56:11 +0000 (+0000) Subject: fixing 1584 X-Git-Tag: initial-import-from-subversion-38251~20855 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2f3d7275968f03a639e4a1a9b7d4da59eeec0fd3;p=oweals%2Fgnunet.git fixing 1584 --- diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 88ce8fd2e..63c90850d 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -924,6 +924,8 @@ consider_migration_gathering () { struct GNUNET_TIME_Relative delay; + if (dsh == NULL) + return; if (mig_qe != NULL) return; if (mig_task != GNUNET_SCHEDULER_NO_TASK) @@ -1022,10 +1024,13 @@ gather_migration_blocks (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { mig_task = GNUNET_SCHEDULER_NO_TASK; - mig_qe = GNUNET_DATASTORE_get_random (dsh, 0, -1, - GNUNET_TIME_UNIT_FOREVER_REL, - &process_migration_content, NULL); - GNUNET_assert (mig_qe != NULL); + if (dsh != NULL) + { + mig_qe = GNUNET_DATASTORE_get_random (dsh, 0, -1, + GNUNET_TIME_UNIT_FOREVER_REL, + &process_migration_content, NULL); + GNUNET_assert (mig_qe != NULL); + } }