From ec12186d6333988cb58c3113de9468750b7a1a5d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 20 Feb 2023 19:53:04 +0900 Subject: [PATCH] Remove unnecesasry null check on `content` --- osu.Game/Skinning/SkinComponentsContainer.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/osu.Game/Skinning/SkinComponentsContainer.cs b/osu.Game/Skinning/SkinComponentsContainer.cs index d4e0b2e69b..d18e9023cd 100644 --- a/osu.Game/Skinning/SkinComponentsContainer.cs +++ b/osu.Game/Skinning/SkinComponentsContainer.cs @@ -74,17 +74,12 @@ namespace osu.Game.Skinning cancellationSource?.Cancel(); cancellationSource = null; - if (content != null) + LoadComponentAsync(content, wrapper => { - LoadComponentAsync(content, wrapper => - { - AddInternal(wrapper); - components.AddRange(wrapper.Children.OfType()); - ComponentsLoaded = true; - }, (cancellationSource = new CancellationTokenSource()).Token); - } - else + AddInternal(wrapper); + components.AddRange(wrapper.Children.OfType()); ComponentsLoaded = true; + }, (cancellationSource = new CancellationTokenSource()).Token); } ///