mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 10:33:07 +08:00
Fix osu crashing if a invalid gamerule is given in the game.ini
This commit is contained in:
parent
a0488b8219
commit
b3b1f2018e
@ -109,7 +109,7 @@ namespace osu.Game
|
||||
dependencies.Cache(this);
|
||||
|
||||
configRuleset = LocalConfig.GetBindable<int>(OsuSetting.Ruleset);
|
||||
Ruleset.Value = RulesetStore.GetRuleset(configRuleset.Value);
|
||||
Ruleset.Value = RulesetStore.GetRuleset(configRuleset.Value) ?? RulesetStore.AvailableRulesets.First();
|
||||
Ruleset.ValueChanged += r => configRuleset.Value = r.ID ?? 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user