1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Test if there are beatmaps when click on delete btn

This commit is contained in:
Paul Teng 2018-09-20 22:00:20 -04:00
parent 52877eca83
commit 49fbe8443a

View File

@ -537,6 +537,8 @@ namespace osu.Game.Screens.Select
private void delete(BeatmapSetInfo beatmap)
{
if (beatmap == null) return;
// Null check because no beatmaps actually causes beatmap.Beatmaps to be null
if (!(beatmap.Beatmaps?.Any() ?? false)) return;
dialogOverlay?.Push(new BeatmapDeleteDialog(beatmap));
}