Explorar o código

Dispose check

flabbet hai 1 ano
pai
achega
d0647a7a89
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/PixiEditor/Views/Rendering/Scene.cs

+ 1 - 1
src/PixiEditor/Views/Rendering/Scene.cs

@@ -138,7 +138,7 @@ internal class Scene : Zoombox.Zoombox, ICustomHitTest
 
     public override void Render(DrawingContext context)
     {
-        if (Surface == null || Document == null) return;
+        if (Surface == null || Surface.IsDisposed || Document == null) return;
 
         float angle = (float)MathUtil.RadiansToDegrees(AngleRadians);