Fixes #3990 All images uploaded to media section have umbracoHeight / umbracoWidth of 200x200px

(cherry picked from commit 086157cff8)
This commit is contained in:
Sebastiaan Janssen
2019-01-08 12:50:36 +01:00
parent 0150b97278
commit 7658fba725
5 changed files with 18 additions and 13 deletions
+2 -1
View File
@@ -365,7 +365,8 @@ namespace Umbraco.Core.IO
{
var jpgInfo = ImageFile.FromStream(stream);
if (jpgInfo.Format != ImageFileFormat.Unknown
if (jpgInfo != null
&& jpgInfo.Format != ImageFileFormat.Unknown
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelYDimension)
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelXDimension))
{