Fix nullability failure

This commit is contained in:
Dean Herbert 2024-07-04 19:45:41 +09:00
parent b2af49c102
commit e3c8bee7d0
No known key found for this signature in database
1 changed files with 5 additions and 1 deletions

View File

@ -7,6 +7,7 @@
using osu.Framework.Allocation;
using osu.Framework.Audio.Sample;
using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -201,7 +202,10 @@ protected void SetSources(IEnumerable<ISkin> sources)
source.SourceChanged -= TriggerSourceChanged;
}
skinSources = sources.Select(skin => (skin, new DisableableSkinSource(skin, this))).ToArray();
skinSources = sources
// Shouldn't be required after NRT is applied to all calling sources.
.Where(skin => skin.IsNotNull())
.Select(skin => (skin, new DisableableSkinSource(skin, this))).ToArray();
foreach (var skin in skinSources)
{