mirror of https://github.com/ppy/osu
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 @@ public LegacyGlyphStore(string fontName, ISkin skin, Vector2? maxSize)
|
|||
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