From d53217d08d68a3c66d621298a880d22db5e73c3a Mon Sep 17 00:00:00 2001
From: Momcilo Medic <medicmomcilo@gmail.com>
Date: Thu, 8 Jun 2017 15:11:57 +0200
Subject: [PATCH] Fixes bug 0000824 - 'Consolidation pool requires storage'

---
 src/dird/migrate.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/dird/migrate.c b/src/dird/migrate.c
index 617b9f3b..da04622b 100644
--- a/src/dird/migrate.c
+++ b/src/dird/migrate.c
@@ -236,9 +236,12 @@ bool set_migration_wstorage(JCR *jcr, POOLRES *pool, POOLRES *next_pool, const c
    }
 
    if (!next_pool->storage || next_pool->storage->size() == 0) {
-      Jmsg(jcr, M_FATAL, 0, _("No Storage specification found in Next Pool \"%s\".\n"),
-           next_pool->name());
-      return false;
+      if (!jcr->res.wstorage) {
+         Jmsg(jcr, M_FATAL, 0, _("No Storage specification found in Job or Next Pool \"%s\".\n"),
+              next_pool->name());
+         return false;
+      }
+      return true;
    }
 
    copy_wstorage(jcr, next_pool->storage, where);
-- 
2.13.0

