1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 03:42:57 +08:00

Fix GameplayState not handled as nullable

This commit is contained in:
Salman Ahmed 2024-02-29 07:13:32 +03:00
parent 4b0b0735a8
commit dac8f98ea6

View File

@ -54,14 +54,14 @@ namespace osu.Game.Rulesets.Taiko.UI
}
[BackgroundDependencyLoader(true)]
private void load(GameplayState gameplayState)
private void load([CanBeNull] GameplayState gameplayState)
{
new BarLineGenerator<BarLine>(Beatmap).BarLines.ForEach(bar => Playfield.Add(bar));
var spriteElements = gameplayState.Storyboard.Layers.Where(l => l.Name != @"Overlay")
var spriteElements = gameplayState?.Storyboard.Layers.Where(l => l.Name != @"Overlay")
.SelectMany(l => l.Elements)
.OfType<StoryboardSprite>()
.DistinctBy(e => e.Path);
.DistinctBy(e => e.Path) ?? Enumerable.Empty<StoryboardSprite>();
if (spriteElements.Count() < 10)
{