From ac18cffcaba8590baea2c7541f9c615a6b29992a Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 25 Dec 2017 18:41:53 +0100 Subject: [PATCH] DolphinQt2: Don't crash when trying to play without a game selected --- Source/Core/DolphinQt2/MainWindow.cpp | 6 +++--- 1 file 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 selection = m_game_list->GetSelectedGame(); + if (selection) { - StartGame(selection); + StartGame(selection->GetFilePath()); } else {