Merge pull request #8876 from JosJuice/multiselect-crash

DolphinQt: Fix crash on right-clicking multiple games
This commit is contained in:
Tilka 2020-06-16 09:50:30 +01:00 committed by GitHub
commit 26789163e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -256,7 +256,9 @@ void GameList::ShowContextMenu(const QPoint&)
if (HasMultipleSelected())
{
if (std::all_of(GetSelectedGames().begin(), GetSelectedGames().end(), [](const auto& game) {
const auto selected_games = GetSelectedGames();
if (std::all_of(selected_games.begin(), selected_games.end(), [](const auto& game) {
// Converting from TGC is temporarily disabled because PR #8738 was merged prematurely.
// The TGC check will be removed by PR #8644.
return DiscIO::IsDisc(game->GetPlatform()) && game->IsVolumeSizeAccurate() &&
@ -267,7 +269,7 @@ void GameList::ShowContextMenu(const QPoint&)
menu->addSeparator();
}
if (std::all_of(GetSelectedGames().begin(), GetSelectedGames().end(),
if (std::all_of(selected_games.begin(), selected_games.end(),
[](const auto& game) { return DiscIO::IsWii(game->GetPlatform()); }))
{
menu->addAction(tr("Export Wii Saves"), this, &GameList::ExportWiiSave);