mirror of https://github.com/ppy/osu
Fix incorrect beatmap set info equality check on non-online set info
This commit is contained in:
parent
8bba6288a8
commit
14c72f85fa
|
@ -63,6 +63,12 @@ public int? OnlineBeatmapSetID
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue