Browse Source

Avoid NRE from GetGlyphPath (#14530)

Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
release/11.0.9
Max Katz 2 years ago
parent
commit
1a7a99c05e
  1. 2
      src/Skia/Avalonia.Skia/PlatformRenderInterface.cs

2
src/Skia/Avalonia.Skia/PlatformRenderInterface.cs

@ -94,7 +94,7 @@ namespace Avalonia.Skia
var glyph = glyphRun.GlyphInfos[i].GlyphIndex;
var glyphPath = skFont.GetGlyphPath(glyph);
if (!glyphPath.IsEmpty)
if (glyphPath is not null && !glyphPath.IsEmpty)
{
path.AddPath(glyphPath, (float)currentX, (float)currentY);
}

Loading…
Cancel
Save