1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:02:53 +08:00

Fix incorrect beatmap set info equality check on non-online set info

This commit is contained in:
iiSaLMaN 2019-10-15 23:40:48 +03:00
parent 8bba6288a8
commit 14c72f85fa

View File

@ -63,6 +63,12 @@ namespace osu.Game.Beatmaps
public bool Protected { get; set; }
public bool Equals(BeatmapSetInfo other) => OnlineBeatmapSetID == other?.OnlineBeatmapSetID;
public bool Equals(BeatmapSetInfo other)
{
if (!OnlineBeatmapSetID.HasValue || !(other?.OnlineBeatmapSetID.HasValue ?? false))
return ReferenceEquals(this, other);
return OnlineBeatmapSetID == other.OnlineBeatmapSetID;
}
}
}