Qt: Cancel game list refresh before GetSaveStateFileName()

Fixes lockup/crash when starting a file early.
This commit is contained in:
Stenzek 2023-02-27 00:55:44 +10:00 committed by refractionpcsx2
parent 3128c48d5b
commit be769c28fa
1 changed files with 3 additions and 0 deletions

View File

@ -2882,6 +2882,9 @@ void MainWindow::doStartFile(std::optional<CDVD_SourceType> source, const QStrin
// we might still be saving a resume state...
VMManager::WaitForSaveStateFlush();
// GetSaveStateFileName() might temporarily mount the ISO to get the serial.
cancelGameListRefresh();
const std::optional<bool> resume(
promptForResumeState(QString::fromStdString(VMManager::GetSaveStateFileName(params->filename.c_str(), -1))));
if (!resume.has_value())