1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 07:22:54 +08:00

Remove unnecesasry null check on content

This commit is contained in:
Dean Herbert 2023-02-20 19:53:04 +09:00
parent 18700b4daa
commit ec12186d63

View File

@ -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<ISerialisableDrawable>());
ComponentsLoaded = true;
}, (cancellationSource = new CancellationTokenSource()).Token);
}
else
AddInternal(wrapper);
components.AddRange(wrapper.Children.OfType<ISerialisableDrawable>());
ComponentsLoaded = true;
}, (cancellationSource = new CancellationTokenSource()).Token);
}
/// <inheritdoc cref="ISerialisableDrawableContainer"/>