From 170051614840aed5f39082b5e151b1ab8d0106cd Mon Sep 17 00:00:00 2001 From: agrath Date: Thu, 26 Jul 2012 16:05:44 -1200 Subject: [PATCH] Another NRE that I missed --- .../businesslogic/datatype/FileHandlerData.cs | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/umbraco.cms/businesslogic/datatype/FileHandlerData.cs b/src/umbraco.cms/businesslogic/datatype/FileHandlerData.cs index 0b856bf733..f34677c4dc 100644 --- a/src/umbraco.cms/businesslogic/datatype/FileHandlerData.cs +++ b/src/umbraco.cms/businesslogic/datatype/FileHandlerData.cs @@ -132,18 +132,21 @@ namespace umbraco.cms.businesslogic.datatype private void clearRelatedValues() { string propertyTypeAlias = new Property(PropertyId).PropertyType.Alias; - XmlNode uploadFieldConfigNode = - UmbracoSettings.ImageAutoFillImageProperties.SelectSingleNode( - string.Format("uploadField [@alias = \"{0}\"]", propertyTypeAlias)); - if (uploadFieldConfigNode != null) + if (UmbracoSettings.ImageAutoFillImageProperties != null) { - // get the current document - Content content = Content.GetContentFromVersion(Version); - // only add dimensions to web images - updateContentProperty(uploadFieldConfigNode, content, "widthFieldAlias", String.Empty); - updateContentProperty(uploadFieldConfigNode, content, "heightFieldAlias", String.Empty); - updateContentProperty(uploadFieldConfigNode, content, "lengthFieldAlias", String.Empty); - updateContentProperty(uploadFieldConfigNode, content, "extensionFieldAlias", String.Empty); + XmlNode uploadFieldConfigNode = + UmbracoSettings.ImageAutoFillImageProperties.SelectSingleNode( + string.Format("uploadField [@alias = \"{0}\"]", propertyTypeAlias)); + if (uploadFieldConfigNode != null) + { + // get the current document + Content content = Content.GetContentFromVersion(Version); + // only add dimensions to web images + updateContentProperty(uploadFieldConfigNode, content, "widthFieldAlias", String.Empty); + updateContentProperty(uploadFieldConfigNode, content, "heightFieldAlias", String.Empty); + updateContentProperty(uploadFieldConfigNode, content, "lengthFieldAlias", String.Empty); + updateContentProperty(uploadFieldConfigNode, content, "extensionFieldAlias", String.Empty); + } } }