1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-09 20:54:47 +08:00

Merge https://github.com/ppy/osu into online-beatmap-set-overlay

This commit is contained in:
DrabWeb
2017-09-12 23:41:57 -03:00
Unverified
+5
View File
@@ -100,6 +100,11 @@ namespace osu.Game.Beatmaps
public bool Equals(BeatmapInfo other)
{
if (ID == 0 || other?.ID == 0)
// one of the two BeatmapInfos we are comparing isn't sourced from a database.
// fall back to reference equality.
return ReferenceEquals(this, other);
return ID == other?.ID;
}