Another NRE that I missed

This commit is contained in:
agrath
2012-07-26 16:05:44 -12:00
parent 3654070f2e
commit 1700516148

View File

@@ -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);
}
}
}