mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 11:23:00 +08:00
Merge pull request #1055 from tgi74/master
Fixed various exceptions when no beatmaps are imported
This commit is contained in:
commit
1c501df83c
@ -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)
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user