From 27a0495c0eda792975d3354785918ed55af9b952 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 5 Feb 2023 14:47:54 +1000 Subject: [PATCH] Qt: Fix crash when right clicking with no game selected --- src/duckstation-qt/mainwindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index fed124cc6..ea87ca8ac 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -1419,14 +1419,14 @@ 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("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); });