Bladeren bron

Bounds check

Krzysztof Krysiński 5 maanden geleden
bovenliggende
commit
ac76951638
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      src/PixiEditor/ViewModels/Document/DocumentViewModel.Serialization.cs

+ 1 - 1
src/PixiEditor/ViewModels/Document/DocumentViewModel.Serialization.cs

@@ -584,7 +584,7 @@ internal partial class DocumentViewModel
 
         DrawingSurface surface = null;
 
-        if (bounds != null)
+        if (bounds != null && bounds.Value.Width > 0 && bounds.Value.Height > 0)
         {
             surface = DrawingBackendApi.Current.SurfaceImplementation.Create(
                 new ImageInfo(bounds.Value.Width, bounds.Value.Height));