mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
FutureScheduler: fix possible race, connect before setFuture
This commit is contained in:
parent
3d7ded209a
commit
3ea329e45f
1 changed files with 1 additions and 1 deletions
|
@ -50,10 +50,10 @@ private:
|
|||
try
|
||||
{
|
||||
auto *watcher = newWatcher<T>();
|
||||
watcher->setFuture(makeFuture(watcher));
|
||||
connect(watcher, &QFutureWatcher<T>::finished, [this, watcher] {
|
||||
watcher->deleteLater();
|
||||
});
|
||||
watcher->setFuture(makeFuture(watcher));
|
||||
return qMakePair(true, watcher->future());
|
||||
}
|
||||
catch (const std::exception &exception)
|
||||
|
|
Loading…
Reference in a new issue