mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 13:37:25 +08:00
Return null on font lookup failure instead of asserting
Fallback weirdness.
This commit is contained in:
parent
16ea7f9b77
commit
dc31c66f62
@ -3,7 +3,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
@ -74,7 +73,8 @@ namespace osu.Game.Skinning
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user