summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt2/MainWindow.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-12-25 18:41:53 +0100
committerJosJuice <josjuice@gmail.com>2017-12-25 18:41:53 +0100
commitac18cffcaba8590baea2c7541f9c615a6b29992a (patch)
tree9192d274e5d2f9e38fb4b9925768431b9723f67b /Source/Core/DolphinQt2/MainWindow.cpp
parentb187d4cd084b20f389d1440b5de53b89101817d5 (diff)
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
{