1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Add protections against test null refs when beatmap load fails

This commit is contained in:
Dean Herbert 2022-01-11 18:33:35 +09:00
parent f986c3ebd4
commit b7ee6d1866
2 changed files with 6 additions and 0 deletions

View File

@ -389,6 +389,9 @@ namespace osu.Game.Tests.Visual.Background
while (BlockLoad && !token.IsCancellationRequested)
Thread.Sleep(1);
if (!LoadedBeatmapSuccessfully)
return;
StoryboardEnabled = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
DrawableRuleset.IsPaused.BindTo(IsPaused);
}

View File

@ -94,6 +94,9 @@ namespace osu.Game.Tests.Visual
[BackgroundDependencyLoader]
private void load()
{
if (!LoadedBeatmapSuccessfully)
return;
ScoreProcessor.NewJudgement += r => Results.Add(r);
}
}