1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-29 04:22:55 +08:00

Merge pull request #1141 from jorolf/keybinding-missing-ruleset

Fix osu crashing if a ruleset went missing
This commit is contained in:
Dean Herbert 2017-08-20 14:26:10 +09:00 committed by GitHub
commit 477b8053d6
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ namespace osu.Game.Input
public KeyBindingStore(SQLiteConnection connection, RulesetStore rulesets, Storage storage = null) public KeyBindingStore(SQLiteConnection connection, RulesetStore rulesets, Storage storage = null)
: base(connection, storage) : base(connection, storage)
{ {
foreach (var info in rulesets.Query<RulesetInfo>()) foreach (var info in rulesets.AllRulesets)
{ {
var ruleset = info.CreateInstance(); var ruleset = info.CreateInstance();
foreach (var variant in ruleset.AvailableVariants) foreach (var variant in ruleset.AvailableVariants)

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays
{ {
AddSection(new GlobalKeyBindingsSection(global, "Global")); AddSection(new GlobalKeyBindingsSection(global, "Global"));
foreach (var ruleset in rulesets.Query<RulesetInfo>()) foreach (var ruleset in rulesets.AllRulesets)
AddSection(new RulesetBindingsSection(ruleset)); AddSection(new RulesetBindingsSection(ruleset));
} }