Merge pull request #6099 from leoetlino/activate

Qt: Don't crash when pressing the Return key
This commit is contained in:
Leo Lam 2017-10-11 11:32:09 +02:00 committed by GitHub
commit 53ccd41049
1 changed files with 1 additions and 1 deletions

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