Qt: Don't crash when pressing the Return key

This commit is contained in:
Léo Lam 2017-10-07 14:53:30 +02:00
parent 5f0de43828
commit 468bf75a43

View File

@ -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);