1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-01 13:20:11 +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
Unverified
parent a0488b8219
commit b3b1f2018e
+1 -1
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;
}