Merge pull request #6272 from JosJuice/qt-no-selected-game

DolphinQt2: Don't crash when trying to play without a game selected
This commit is contained in:
Leo Lam 2017-12-25 20:07:14 +01:00 committed by GitHub
commit c9b78e23a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -340,10 +340,10 @@ void MainWindow::Play()
}
else
{
QString selection = m_game_list->GetSelectedGame()->GetFilePath();
if (selection.length() > 0)
QSharedPointer<GameFile> selection = m_game_list->GetSelectedGame();
if (selection)
{
StartGame(selection);
StartGame(selection->GetFilePath());
}
else
{