mirror of
https://github.com/ppy/osu.git
synced 2025-03-01 00:12:56 +08:00
Change second occurrence of debug.assert with early return for fallback safety
This commit is contained in:
parent
3f5899dae0
commit
765d41faa9
@ -159,7 +159,8 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
public ITexturedCharacterGlyph? Get(string? fontName, char character)
|
public ITexturedCharacterGlyph? Get(string? fontName, char character)
|
||||||
{
|
{
|
||||||
// We only service one font.
|
// We only service one font.
|
||||||
Debug.Assert(fontName == this.fontName);
|
if (fontName != this.fontName)
|
||||||
|
return null;
|
||||||
|
|
||||||
if (cache.TryGetValue(character, out var cached))
|
if (cache.TryGetValue(character, out var cached))
|
||||||
return cached;
|
return cached;
|
||||||
|
Loading…
Reference in New Issue
Block a user