diff --git a/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs b/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs index 9972bcf506b..19df1249101 100644 --- a/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs +++ b/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs @@ -94,7 +94,7 @@ public IGeometryImpl BuildGlyphRunGeometry(GlyphRun glyphRun) 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); }