mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:02:54 +08:00
Merge pull request #1557 from miterosan/Fix_osu_crashing_when_an_unknown_ruleset_is_selected_in_the_config
Fix osu crashing if a invalid gamerule is given in the game.ini
This commit is contained in:
commit
7c65048ae5
@ -109,7 +109,7 @@ namespace osu.Game
|
|||||||
dependencies.Cache(this);
|
dependencies.Cache(this);
|
||||||
|
|
||||||
configRuleset = LocalConfig.GetBindable<int>(OsuSetting.Ruleset);
|
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;
|
Ruleset.ValueChanged += r => configRuleset.Value = r.ID ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user