1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 00:42:55 +08:00

Add source lookups for safety

This commit is contained in:
Dean Herbert 2019-08-31 16:56:32 +09:00
parent 7406e00bfc
commit 3da5eb6c8b

View File

@ -110,9 +110,9 @@ namespace osu.Game.Rulesets.Osu.Skinning
return null;
}
public Texture GetTexture(string componentName) => null;
public Texture GetTexture(string componentName) => source.GetTexture(componentName);
public SampleChannel GetSample(ISampleInfo sample) => null;
public SampleChannel GetSample(ISampleInfo sample) => source.GetSample(sample);
public TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration
=> configuration.Value is TConfiguration conf ? query.Invoke(conf) : default;