mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 00:42:55 +08:00
Explicitly handle null settings case + add annotations
This commit is contained in:
parent
b219c17115
commit
63ec36b3be
@ -13,6 +13,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Input;
|
||||
@ -86,10 +87,12 @@ namespace osu.Game.Rulesets.UI
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(OnScreenDisplay onScreenDisplay, SettingsStore settings)
|
||||
private void load([CanBeNull] OnScreenDisplay onScreenDisplay, [CanBeNull] SettingsStore settings)
|
||||
{
|
||||
this.onScreenDisplay = onScreenDisplay;
|
||||
|
||||
if (settings != null)
|
||||
{
|
||||
rulesetConfig = CreateConfig(Ruleset, settings);
|
||||
|
||||
if (rulesetConfig != null)
|
||||
@ -98,6 +101,7 @@ namespace osu.Game.Rulesets.UI
|
||||
onScreenDisplay?.BeginTracking(this, rulesetConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private DependencyContainer dependencies;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user