summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt2/MainWindow.cpp
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-12-25 20:07:14 +0100
committerGitHub <noreply@github.com>2017-12-25 20:07:14 +0100
commitc9b78e23a20b3bab7af132ca870b4df8440c2145 (patch)
tree9192d274e5d2f9e38fb4b9925768431b9723f67b /Source/Core/DolphinQt2/MainWindow.cpp
parentb187d4cd084b20f389d1440b5de53b89101817d5 (diff)
parentac18cffcaba8590baea2c7541f9c615a6b29992a (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.cpp6
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
{