Fix potentially adding null skin sources

This commit is contained in:
Salman Ahmed 2021-06-11 12:58:38 +03:00
parent fbb856d84b
commit f20146d446

View File

@ -51,10 +51,11 @@ namespace osu.Game.Skinning
/// <summary>
/// Constructs a new <see cref="SkinProvidingContainer"/> initialised with a single skin source.
/// </summary>
public SkinProvidingContainer(ISkin skin)
public SkinProvidingContainer([CanBeNull] ISkin skin)
: this()
{
SkinSources.Add(skin);
if (skin != null)
SkinSources.Add(skin);
}
/// <summary>