1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:32:55 +08:00

Avoid attempting to process missing statistics on scores without linked beatmaps

This commit is contained in:
Dean Herbert 2023-07-06 12:29:03 +09:00
parent 9ff6b3fcd3
commit b679ab88a1

View File

@ -163,8 +163,12 @@ namespace osu.Game
{
foreach (var score in r.All<ScoreInfo>())
{
if (score.Statistics.Sum(kvp => kvp.Value) > 0 && score.MaximumStatistics.Sum(kvp => kvp.Value) == 0)
if (score.BeatmapInfo != null
&& score.Statistics.Sum(kvp => kvp.Value) > 0
&& score.MaximumStatistics.Sum(kvp => kvp.Value) == 0)
{
scoreIds.Add(score.ID);
}
}
});