mirror of
https://github.com/ppy/osu
synced 2024-12-15 19:36:34 +00:00
Allow RulesetConfigCache to return null configs (#5835)
Allow RulesetConfigCache to return null configs
This commit is contained in:
commit
28dc51279a
@ -32,7 +32,7 @@ namespace osu.Game.Rulesets
|
||||
public IRulesetConfigManager GetConfigFor(Ruleset ruleset)
|
||||
{
|
||||
if (ruleset.RulesetInfo.ID == null)
|
||||
throw new InvalidOperationException("The provided ruleset doesn't have a valid id.");
|
||||
return null;
|
||||
|
||||
return configCache.GetOrAdd(ruleset.RulesetInfo.ID.Value, _ => ruleset.CreateConfig(settingsStore));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user