diff --git a/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs b/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs index a5046796271..7524e498d7e 100644 --- a/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs +++ b/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs @@ -35,6 +35,9 @@ public PlatformRenderInterface(ISkiaGpu skiaGpu, long? maxResourceBytes = null) var gl = AvaloniaLocator.Current.GetService(); if (gl != null) _skiaGpu = new GlSkiaGpu(gl, maxResourceBytes); + + //TODO: SKFont crashes when disposed in finalizer so we keep it alive + GC.SuppressFinalize(s_font); } ///