1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

Fix osu crashing if a invalid gamerule is given in the game.ini

This commit is contained in:
Miterosan 2017-11-21 15:13:00 +01:00
parent a0488b8219
commit b3b1f2018e

View File

@ -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;
}