Guard against NewModifiedIndices being empty

This commit is contained in:
Dean Herbert
2022-07-27 14:23:47 +09:00
parent 24d75612e2
commit e6a3659581

View File

@ -273,7 +273,7 @@ namespace osu.Game.Screens.Select
// Check if the current selection was potentially deleted by re-querying its validity.
bool selectedSetMarkedDeleted = realm.Run(r => r.Find<BeatmapSetInfo>(SelectedBeatmapSet.ID))?.DeletePending != false;
if (selectedSetMarkedDeleted)
if (selectedSetMarkedDeleted && changes.NewModifiedIndices.Any())
{
// If it is no longer valid, make the bold assumption that an updated version will be available in the modified indices.
// This relies on the full update operation being in a single transaction, so please don't change that.