1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-26 13:42:23 +08:00

Fix crash when loading results after gameplay (#6886)

Fix crash when loading results after gameplay
This commit is contained in:
Dean Herbert
2019-11-20 15:52:09 +09:00
committed by GitHub
Unverified
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -183,6 +183,10 @@ namespace osu.Game.Scoring
public override string ToString() => $"{User} playing {Beatmap}";
public bool Equals(ScoreInfo other) => other?.OnlineScoreID == OnlineScoreID;
public bool Equals(ScoreInfo other) =>
other != null
&& other.OnlineScoreID == OnlineScoreID
&& other.BeatmapInfoID == BeatmapInfoID
&& other.Hash == Hash;
}
}
+1 -1
View File
@@ -69,6 +69,6 @@ namespace osu.Game.Scoring
protected override ArchiveDownloadRequest<ScoreInfo> CreateDownloadRequest(ScoreInfo score, bool minimiseDownload) => new DownloadReplayRequest(score);
protected override bool CheckLocalAvailability(ScoreInfo model, IQueryable<ScoreInfo> items) => items.Any(s => s.OnlineScoreID == model.OnlineScoreID && s.Files.Any());
protected override bool CheckLocalAvailability(ScoreInfo model, IQueryable<ScoreInfo> items) => items.Any(s => s.Equals(model) && s.Files.Any());
}
}