1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Add null check

This commit is contained in:
smoogipoo 2019-11-20 13:42:54 +09:00
parent 76ed573c56
commit 6288e6da56

View File

@ -184,8 +184,9 @@ namespace osu.Game.Scoring
public override string ToString() => $"{User} playing {Beatmap}"; public override string ToString() => $"{User} playing {Beatmap}";
public bool Equals(ScoreInfo other) => public bool Equals(ScoreInfo other) =>
other?.OnlineScoreID == OnlineScoreID other != null
&& other?.BeatmapInfoID == BeatmapInfoID && other.OnlineScoreID == OnlineScoreID
&& other.BeatmapInfoID == BeatmapInfoID
&& other.Hash == Hash; && other.Hash == Hash;
} }
} }