Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11809 from malleoz/malleo/savestate-action-cancel…
…-upstream

Qt: Prevent savestate load/save on empty filename
  • Loading branch information
AdmiralCurtiss committed May 2, 2023
2 parents b514df1 + 9b1d657 commit 2fa84c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Core/DolphinQt/MainWindow.cpp
Expand Up @@ -1352,15 +1352,17 @@ void MainWindow::StateLoad()
QString path =
DolphinFileDialog::getOpenFileName(this, tr("Select a File"), QDir::currentPath(),
tr("All Save States (*.sav *.s##);; All Files (*)"));
State::LoadAs(path.toStdString());
if (!path.isEmpty())
State::LoadAs(path.toStdString());
}

void MainWindow::StateSave()
{
QString path =
DolphinFileDialog::getSaveFileName(this, tr("Select a File"), QDir::currentPath(),
tr("All Save States (*.sav *.s##);; All Files (*)"));
State::SaveAs(path.toStdString());
if (!path.isEmpty())
State::SaveAs(path.toStdString());
}

void MainWindow::StateLoadSlot()
Expand Down

0 comments on commit 2fa84c7

Please sign in to comment.