diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2018-05-22 01:03:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-22 01:03:20 +0200 |
| commit | 302093d777c895ee7b04df5f02de347d65622b52 (patch) | |
| tree | cd1d10ab07f47a2a9cce7069c558bc7cb6324ca2 /Source/Core/DolphinQt2/MainWindow.cpp | |
| parent | f31f1a08fb8dca9e51e79d1d3a65ee8bff38273b (diff) | |
| parent | 268b424843c859d5d063dfa2da8b3edd7670cddc (diff) | |
Merge pull request #6934 from riking/runonobject
QtUtils/RunOnObject: Make safe under object destruction
Diffstat (limited to 'Source/Core/DolphinQt2/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/MainWindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index 78ac8725e5..90bf1b2d20 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -1196,13 +1196,16 @@ void MainWindow::OnImportNANDBackup() }); }, [this] { - return RunOnObject(this, [this] { + std::optional<std::string> keys_file = RunOnObject(this, [this] { return QFileDialog::getOpenFileName(this, tr("Select the keys file (OTP/SEEPROM dump)"), QDir::currentPath(), tr("BootMii keys file (*.bin);;" "All Files (*)")) .toStdString(); }); + if (keys_file) + return *keys_file; + return std::string(""); }); QueueOnObject(dialog, &QProgressDialog::close); }); |
