mirror of
https://github.com/ppy/osu
synced 2024-12-13 10:28:17 +00:00
Fix BeatmapInfo's comparator when not being sourced from database
This commit is contained in:
parent
452506d982
commit
1de1b882e3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user