diff options
| author | Leo Lam <leolino.lam@gmail.com> | 2017-12-25 20:07:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-25 20:07:14 +0100 |
| commit | c9b78e23a20b3bab7af132ca870b4df8440c2145 (patch) | |
| tree | 9192d274e5d2f9e38fb4b9925768431b9723f67b /Source/Core/DolphinQt2/MainWindow.cpp | |
| parent | b187d4cd084b20f389d1440b5de53b89101817d5 (diff) | |
| parent | ac18cffcaba8590baea2c7541f9c615a6b29992a (diff) | |
Merge pull request #6272 from JosJuice/qt-no-selected-game
DolphinQt2: Don't crash when trying to play without a game selected
Diffstat (limited to 'Source/Core/DolphinQt2/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/MainWindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index c31821d054..beefe311c3 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -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 { |
