Qt: Fix crash when right clicking with no game selected

This commit is contained in:
Stenzek 2023-02-05 14:47:54 +10:00
parent bd1df7b25b
commit 27a0495c0e

View file

@ -1419,13 +1419,13 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point)
}
menu.addSeparator();
}
connect(menu.addAction(tr("Exclude From List")), &QAction::triggered,
[this, entry]() { getSettingsDialog()->getGameListSettingsWidget()->addExcludedPath(entry->path); });
connect(menu.addAction(tr("Reset Play Time")), &QAction::triggered,
[this, entry]() { clearGameListEntryPlayTime(entry); });
}
connect(menu.addAction(tr("Add Search Directory...")), &QAction::triggered,
[this]() { getSettingsDialog()->getGameListSettingsWidget()->addSearchDirectory(this); });