diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index d2621a8..d97a1f5 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -979,15 +979,10 @@ void MainWindow::prepare_exit() Configs::dataStore->save_control_no_save = true; // don't change datastore after this line profile_stop(false, true); - QMutex coreKillMu; - coreKillMu.lock(); - runOnThread([=, this, &coreKillMu]() + runOnThread([=, this]() { core_process->Kill(); - coreKillMu.unlock(); - }, DS_cores); - coreKillMu.lock(); - coreKillMu.unlock(); + }, DS_cores, true); mu_exit.unlock(); qDebug() << "prepare exit done!";