From 2f3d7275968f03a639e4a1a9b7d4da59eeec0fd3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 22 Jul 2010 11:56:11 +0000 Subject: [PATCH] fixing 1584 --- src/fs/gnunet-service-fs.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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); + } } -- 2.25.1