mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Throw if a null BeatmapInfo
arrives during score import process
This commit is contained in:
parent
e2ddcb2349
commit
5947c2b298
@ -98,10 +98,12 @@ namespace osu.Game.Scoring
|
||||
/// <param name="score">The score to populate the statistics of.</param>
|
||||
public void PopulateMaximumStatistics(ScoreInfo score)
|
||||
{
|
||||
Debug.Assert(score.BeatmapInfo != null);
|
||||
|
||||
if (score.MaximumStatistics.Select(kvp => kvp.Value).Sum() > 0)
|
||||
return;
|
||||
|
||||
var beatmap = score.BeatmapInfo?.Detach();
|
||||
var beatmap = score.BeatmapInfo!.Detach();
|
||||
var ruleset = score.Ruleset.Detach();
|
||||
var rulesetInstance = ruleset.CreateInstance();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user