1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-22 06:47:19 +08:00

Construct replay after being sure a ruleset is available to avoid nullrefs

This commit is contained in:
Dean Herbert 2020-10-28 22:10:37 +09:00
parent 6169349f7c
commit 25ab3a5fea

View File

@ -160,8 +160,6 @@ namespace osu.Game.Screens.Play
if (userId != targetUser.Id)
return;
replay ??= new Replay { HasReceivedAllFrames = false };
this.state = state;
Schedule(attemptStart);
@ -197,6 +195,8 @@ namespace osu.Game.Screens.Play
return;
}
replay ??= new Replay { HasReceivedAllFrames = false };
var scoreInfo = new ScoreInfo
{
Beatmap = resolvedBeatmap,