From 8adf0a6db32ede8350df91963cf67d50818f0283 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 13 Nov 2017 13:58:44 +0900 Subject: [PATCH 1/2] Null-check in disposal of DatabasedKeyBindingInputManager --- osu.Game/Input/Bindings/DatabasedKeyBindingInputManager.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Input/Bindings/DatabasedKeyBindingInputManager.cs b/osu.Game/Input/Bindings/DatabasedKeyBindingInputManager.cs index 6dedf7385b..bae14fc1dc 100644 --- a/osu.Game/Input/Bindings/DatabasedKeyBindingInputManager.cs +++ b/osu.Game/Input/Bindings/DatabasedKeyBindingInputManager.cs @@ -51,7 +51,9 @@ namespace osu.Game.Input.Bindings protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); - store.KeyBindingChanged -= ReloadMappings; + + if (store != null) + store.KeyBindingChanged -= ReloadMappings; } protected override void ReloadMappings() => KeyBindings = store.Query(ruleset?.ID, variant).ToList(); From ae8407a3f370d5c7df52c90d54f2b71ff98c36cf Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 13 Nov 2017 14:00:35 +0900 Subject: [PATCH 2/2] Fix nested hitobject judgements not being removed --- osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs | 1 + osu.Game/Rulesets/UI/RulesetContainer.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs index 091af04106..941cedca3f 100644 --- a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs @@ -212,6 +212,7 @@ namespace osu.Game.Rulesets.Objects.Drawables nestedHitObjects = new List>(); h.OnJudgement += (d, j) => OnJudgement?.Invoke(d, j); + h.OnJudgementRemoved += (d, j) => OnJudgementRemoved?.Invoke(d, j); nestedHitObjects.Add(h); } diff --git a/osu.Game/Rulesets/UI/RulesetContainer.cs b/osu.Game/Rulesets/UI/RulesetContainer.cs index 36dce7218d..278814ea7e 100644 --- a/osu.Game/Rulesets/UI/RulesetContainer.cs +++ b/osu.Game/Rulesets/UI/RulesetContainer.cs @@ -242,7 +242,7 @@ namespace osu.Game.Rulesets.UI OnJudgement?.Invoke(j); }; - drawableObject.OnJudgementRemoved += (d, j) => { OnJudgementRemoved?.Invoke(j); }; + drawableObject.OnJudgementRemoved += (d, j) => OnJudgementRemoved?.Invoke(j); Playfield.Add(drawableObject); }