mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 18:43:04 +08:00
Add fallback for safety
This commit is contained in:
parent
d2a3e0581b
commit
2988624f1f
@ -115,7 +115,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
public SampleChannel GetSample(ISampleInfo sample) => null;
|
||||
|
||||
public TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration
|
||||
=> configuration.Value is TConfiguration conf ? query.Invoke(conf) : default;
|
||||
=> configuration.Value is TConfiguration conf ? query.Invoke(conf) : source.GetValue(query);
|
||||
|
||||
private bool hasFont(string fontName) => GetTexture($"{fontName}-0") != null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user