Browse Source

[Bug] Zoom causes crash (Issue #121)

Ruben 2 years ago
parent
commit
681c845afd
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/PicView/UILogic/TransformImage/Zoom.cs

+ 3 - 0
src/PicView/UILogic/TransformImage/Zoom.cs

@@ -293,6 +293,9 @@ internal static class ZoomLogic
     /// <param name="value">The new zoom value.</param>
     private static void Zoom(double value)
     {
+        if (ConfigureWindows.GetMainWindow.MainImage.Source is null)
+            return;
+
         ZoomValue = value;
 
         BeginZoomAnimation(ZoomValue);