From 71c49de0312c769922b91250a1de42eb8f7f5831 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 26 Jul 2018 21:00:18 +0900 Subject: [PATCH] Fix possible nullref if no fruits are ever caught --- osu.Game.Rulesets.Catch/UI/CatcherArea.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs index 2f42902fd0..7b06426b07 100644 --- a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs +++ b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs @@ -52,6 +52,9 @@ public void OnJudgement(DrawableCatchHitObject fruit, Judgement judgement) { void runAfterLoaded(Action action) { + if (lastPlateableFruit == null) + return; + // this is required to make this run after the last caught fruit runs UpdateState at least once. // TODO: find a better alternative if (lastPlateableFruit.IsLoaded)