diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/ImageProfileManager.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/ImageProfileManager.cs index 6284358fb..cc5ec742b 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/ImageProfileManager.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/ImageProfileManager.cs @@ -131,13 +131,12 @@ namespace Orchard.MediaProcessing.Services { // to handle cross machines concurrency lock (String.Intern(path)) { using (var image = GetImage(path)) { + if (image == null) { + return null; + } var filterContext = new FilterContext { Media = image, FilePath = _storageProvider.Combine("_Profiles", FormatProfilePath(profileName, System.Web.HttpUtility.UrlDecode(path))) }; - if (image == null) { - return filterContext.FilePath; - } - var tokens = new Dictionary(); // if a content item is provided, use it while tokenizing if (contentItem != null) {