1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-28 01:47:33 +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) if (userId != targetUser.Id)
return; return;
replay ??= new Replay { HasReceivedAllFrames = false };
this.state = state; this.state = state;
Schedule(attemptStart); Schedule(attemptStart);
@ -197,6 +195,8 @@ namespace osu.Game.Screens.Play
return; return;
} }
replay ??= new Replay { HasReceivedAllFrames = false };
var scoreInfo = new ScoreInfo var scoreInfo = new ScoreInfo
{ {
Beatmap = resolvedBeatmap, Beatmap = resolvedBeatmap,