1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Change second occurrence of debug.assert with early return for fallback safety

This commit is contained in:
Dean Herbert 2024-01-09 14:06:59 +09:00
parent 3f5899dae0
commit 765d41faa9
No known key found for this signature in database

View File

@ -159,7 +159,8 @@ namespace osu.Game.Screens.Play.HUD
public ITexturedCharacterGlyph? Get(string? fontName, char character)
{
// We only service one font.
Debug.Assert(fontName == this.fontName);
if (fontName != this.fontName)
return null;
if (cache.TryGetValue(character, out var cached))
return cached;