Add exception handling in the image viewer zoom mode
[profile/tv/apps/dotnet/mediahub.git] / TVMediaHub / TVMediaHub.Tizen / Views / ImageViewerZoom.xaml.cs
index 7e3b95a..a415c75 100755 (executable)
@@ -364,7 +364,7 @@ namespace TVMediaHub.Tizen.Views
             backgroundThumbnail.Show();
 
             thumbnailImg = new ElmSharp.Image(App.MainWindow);
-            thumbnailImg.Load(ThumbnailPath);
+            thumbnailImg.Load((ThumbnailPath != null) ? ThumbnailPath : (CurrentImage.Source as FileImageSource).File);
             thumbnailImg.Orientation = imgOrientation;
             thumbnailImg.Resize(backgroundThumbnail.Geometry.Width, backgroundThumbnail.Geometry.Height);
             thumbnailImg.Move(backgroundThumbnail.Geometry.X, backgroundThumbnail.Geometry.Y);
@@ -381,7 +381,7 @@ namespace TVMediaHub.Tizen.Views
             thumbnailDim.Show();
 
             clippingImg = new ElmSharp.Image(App.MainWindow);
-            clippingImg.Load(ThumbnailPath);
+            clippingImg.Load((ThumbnailPath != null) ? ThumbnailPath : (CurrentImage.Source as FileImageSource).File);
             clippingImg.Orientation = imgOrientation;
             clippingImg.Resize(thumbnailImg.Geometry.Width, thumbnailImg.Geometry.Height);
             clippingImg.Geometry = thumbnailImg.Geometry;