Fix exception when adding duplicate items

This commit is contained in:
smoogipoo
2020-02-14 19:56:01 +09:00
parent f0f739707f
commit f31220c1ee
2 changed files with 10 additions and 0 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using Humanizer;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
@ -53,6 +54,7 @@ namespace osu.Game.Screens.Select
{
PlaylistItem item = new PlaylistItem
{
ID = (Playlist.LastOrDefault()?.ID + 1) ?? 0,
Beatmap = { Value = Beatmap.Value.BeatmapInfo },
Ruleset = { Value = Ruleset.Value }
};