From 468bf75a436682b7e34ff63b292bbd8c1271a8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 7 Oct 2017 14:53:30 +0200 Subject: [PATCH] Qt: Don't crash when pressing the Return key --- Source/Core/DolphinQt2/GameList/GameList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt2/GameList/GameList.cpp b/Source/Core/DolphinQt2/GameList/GameList.cpp index 5e87376448..a674992d4d 100644 --- a/Source/Core/DolphinQt2/GameList/GameList.cpp +++ b/Source/Core/DolphinQt2/GameList/GameList.cpp @@ -472,7 +472,7 @@ void GameList::ConsiderViewChange() } void GameList::keyReleaseEvent(QKeyEvent* event) { - if (event->key() == Qt::Key_Return) + if (event->key() == Qt::Key_Return && GetSelectedGame() != nullptr) emit GameSelected(); else QStackedWidget::keyReleaseEvent(event);