Fix DI regression

This commit is contained in:
Dean Herbert
2018-07-11 17:25:57 +09:00
parent fbc5250bf1
commit 24054246b8
4 changed files with 19 additions and 15 deletions

View File

@ -3,6 +3,7 @@
using osu.Framework.Allocation;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Configuration;
namespace osu.Game.Overlays.Settings
{
@ -14,6 +15,8 @@ namespace osu.Game.Overlays.Settings
{
private readonly Ruleset ruleset;
protected IRulesetConfigManager Config;
protected RulesetSettingsSubsection(Ruleset ruleset)
{
this.ruleset = ruleset;
@ -25,9 +28,9 @@ namespace osu.Game.Overlays.Settings
{
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
var config = dependencies.Get<RulesetConfigCache>().GetConfigFor(ruleset);
if (config != null)
dependencies.Cache(config);
Config = dependencies.Get<RulesetConfigCache>().GetConfigFor(ruleset);
if (Config != null)
dependencies.Cache(Config);
return dependencies;
}