Browse Source

Fixed crash on save non pixi

flabbet 11 months ago
parent
commit
76896b1a84
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/PixiEditor/Models/Files/ImageFileType.cs

+ 1 - 1
src/PixiEditor/Models/Files/ImageFileType.cs

@@ -38,7 +38,7 @@ internal abstract class ImageFileType : IoFileType
                 return SaveResult.ConcurrencyError;
 
             finalSurface = maybeBitmap.AsT1;
-            if (maybeBitmap.AsT1.Size != exportConfig.ExportSize)
+            if (maybeBitmap.AsT1.Size != exportConfig.ExportSize && exportConfig.ExportSize.X > 0 && exportConfig.ExportSize.Y > 0)
             {
                 finalSurface = finalSurface.ResizeNearestNeighbor(exportConfig.ExportSize);
                 maybeBitmap.AsT1.Dispose();