diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs index 72b5aa1e62..7c84ff7026 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs @@ -51,7 +51,7 @@ namespace Umbraco.Web.PropertyEditors JObject oldJson = null; //get the old src path - if (string.IsNullOrEmpty(currentValue.ToString()) == false) + if (currentValue != null && string.IsNullOrEmpty(currentValue.ToString()) == false) { try { @@ -86,7 +86,7 @@ namespace Umbraco.Web.PropertyEditors var fs = FileSystemProviderManager.Current.GetFileSystemProvider(); //if we have an existing file, delete it - if (!string.IsNullOrEmpty(oldFile)) + if (string.IsNullOrEmpty(oldFile) == false) fs.DeleteFile(fs.GetRelativePath(oldFile), true); else oldFile = string.Empty;