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

Fix crash when loading results after gameplay

This commit is contained in:
smoogipoo 2019-11-20 12:21:49 +09:00
parent 7eaafe63cb
commit 76ed573c56
2 changed files with 5 additions and 2 deletions

View File

@ -183,6 +183,9 @@ 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?.OnlineScoreID == OnlineScoreID
&& other?.BeatmapInfoID == BeatmapInfoID
&& other.Hash == Hash;
}
}

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());
}
}