Browse Source

Avoid NRE from GetGlyphPath (#14530)

Co-authored-by: Jumar Macato <[email protected]>
Max Katz 1 year ago
parent
commit
2c1512d096
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Skia/Avalonia.Skia/PlatformRenderInterface.cs

+ 1 - 1
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);
                 }