diff --git a/src/qt/FutureScheduler.h b/src/qt/FutureScheduler.h index e76021c3..c8eab23a 100644 --- a/src/qt/FutureScheduler.h +++ b/src/qt/FutureScheduler.h @@ -50,10 +50,10 @@ private: try { auto *watcher = newWatcher(); - watcher->setFuture(makeFuture(watcher)); connect(watcher, &QFutureWatcher::finished, [this, watcher] { watcher->deleteLater(); }); + watcher->setFuture(makeFuture(watcher)); return qMakePair(true, watcher->future()); } catch (const std::exception &exception)