mirror of https://github.com/ppy/osu
Allow RulesetConfigCache to return null configs (#5835)
Allow RulesetConfigCache to return null configs
This commit is contained in:
commit
28dc51279a
|
@ -32,7 +32,7 @@ public RulesetConfigCache(SettingsStore settingsStore)
|
|||
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