From bb0237d4a96a75e17034c5309b0e25269977896e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 30 Nov 2022 17:49:08 +0900 Subject: [PATCH] Fix nullability inspection on disposal path --- .../UI/DrawableRulesetDependenciesProvidingContainer.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Rulesets/UI/DrawableRulesetDependenciesProvidingContainer.cs b/osu.Game/Rulesets/UI/DrawableRulesetDependenciesProvidingContainer.cs index 1efe72fdf3..6c213497dd 100644 --- a/osu.Game/Rulesets/UI/DrawableRulesetDependenciesProvidingContainer.cs +++ b/osu.Game/Rulesets/UI/DrawableRulesetDependenciesProvidingContainer.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; +using osu.Framework.Extensions.ObjectExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -28,7 +29,8 @@ namespace osu.Game.Rulesets.UI { base.Dispose(isDisposing); - rulesetDependencies?.Dispose(); + if (rulesetDependencies.IsNotNull()) + rulesetDependencies.Dispose(); } } }