mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:35:35 +08:00
Handle cancellation at more points during Player
initialisation
As discussed in discord, this will help avoid null references during cancellation which can otherwise be quite confusing to debug.
This commit is contained in:
parent
d59f4720f1
commit
a5081826b7
@ -249,6 +249,9 @@ namespace osu.Game.Screens.Play
|
||||
// this is intentionally done in two stages to ensure things are in a loaded state before exposing the ruleset to skin sources.
|
||||
GameplayClockContainer.Add(rulesetSkinProvider);
|
||||
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
rulesetSkinProvider.AddRange(new Drawable[]
|
||||
{
|
||||
failAnimationLayer = new FailAnimation(DrawableRuleset)
|
||||
@ -279,6 +282,9 @@ namespace osu.Game.Screens.Play
|
||||
},
|
||||
});
|
||||
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
if (Configuration.AllowRestart)
|
||||
{
|
||||
rulesetSkinProvider.Add(new HotkeyRetryOverlay
|
||||
|
Loading…
Reference in New Issue
Block a user