mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 10:22:56 +08:00
Add protections against test null refs when beatmap load fails
This commit is contained in:
parent
f986c3ebd4
commit
b7ee6d1866
@ -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);
|
||||
}
|
||||
|
@ -94,6 +94,9 @@ namespace osu.Game.Tests.Visual
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
if (!LoadedBeatmapSuccessfully)
|
||||
return;
|
||||
|
||||
ScoreProcessor.NewJudgement += r => Results.Add(r);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user