1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 12:53:11 +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,8 +74,6 @@ namespace osu.Game.Skinning
cancellationSource?.Cancel(); cancellationSource?.Cancel();
cancellationSource = null; cancellationSource = null;
if (content != null)
{
LoadComponentAsync(content, wrapper => LoadComponentAsync(content, wrapper =>
{ {
AddInternal(wrapper); AddInternal(wrapper);
@ -83,9 +81,6 @@ namespace osu.Game.Skinning
ComponentsLoaded = true; ComponentsLoaded = true;
}, (cancellationSource = new CancellationTokenSource()).Token); }, (cancellationSource = new CancellationTokenSource()).Token);
} }
else
ComponentsLoaded = true;
}
/// <inheritdoc cref="ISerialisableDrawableContainer"/> /// <inheritdoc cref="ISerialisableDrawableContainer"/>
/// <exception cref="NotSupportedException">Thrown when attempting to add an element to a target which is not supported by the current skin.</exception> /// <exception cref="NotSupportedException">Thrown when attempting to add an element to a target which is not supported by the current skin.</exception>