1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 09:27:23 +08:00

Merge pull request #1055 from tgi74/master

Fixed various exceptions when no beatmaps are imported
This commit is contained in:
Dean Herbert 2017-07-25 09:37:30 +09:00 committed by GitHub
commit 1c501df83c
2 changed files with 7 additions and 1 deletions

View File

@ -178,6 +178,9 @@ namespace osu.Game.Screens.Select
public void SelectNextRandom()
{
if (groups.Count == 0)
return;
randomSelectedBeatmaps.Push(new KeyValuePair<BeatmapGroup, BeatmapPanel>(selectedGroup, selectedGroup.SelectedPanel));
var visibleGroups = getVisibleGroups();
@ -311,6 +314,9 @@ namespace osu.Game.Screens.Select
private void removeGroup(BeatmapGroup group)
{
if (group == null)
return;
groups.Remove(group);
panels.Remove(group.Header);
foreach (var p in group.BeatmapPanels)

View File

@ -384,7 +384,7 @@ namespace osu.Game.Screens.Select
private void promptDelete()
{
if (Beatmap != null)
if (Beatmap != null && !Beatmap.IsDefault)
dialogOverlay?.Push(new BeatmapDeleteDialog(Beatmap));
}