Fix U4-2711 add Null Check to ToXMl method

Fixes Object reference not set to an instance of an object. at
umbraco.editorControls.imagecropper.DataTypeData.ToXMl(XmlDocument data)
This commit is contained in:
Robert Stocks
2013-08-27 16:10:04 +01:00
parent 53b6fb7b56
commit 614dc8f4d1

View File

@@ -8,7 +8,7 @@ namespace umbraco.editorControls.imagecropper
public override XmlNode ToXMl(XmlDocument data)
{
if (Value.ToString() != "") {
if (Value!=null && Value.ToString() != "") {
XmlDocument xd = new XmlDocument();
xd.LoadXml(Value.ToString());
return data.ImportNode(xd.DocumentElement, true);