Skip to content

Commit

Permalink
Merge pull request #8876 from JosJuice/multiselect-crash
Browse files Browse the repository at this point in the history
DolphinQt: Fix crash on right-clicking multiple games
  • Loading branch information
Tilka committed Jun 16, 2020
2 parents 6b0476b + 349cdd5 commit 2678916
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Core/DolphinQt/GameList/GameList.cpp
Expand Up @@ -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() &&
Expand All @@ -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);
Expand Down

0 comments on commit 2678916

Please sign in to comment.