Selaa lähdekoodia

Fixed crash on save non pixi

flabbet 1 vuosi sitten
vanhempi
sitoutus
76896b1a84
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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();