Browse Source

Added null check

flabbet 1 year ago
parent
commit
21230d69f5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/PixiEditor/Views/Rendering/Scene.cs

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

@@ -142,7 +142,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);