CMIS-464: CheckIn without properties fails
git-svn-id: https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk@1196311 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/DotCMIS/binding/atompub/atompub-writer.cs b/DotCMIS/binding/atompub/atompub-writer.cs
index 05b99d7..7e03749 100644
--- a/DotCMIS/binding/atompub/atompub-writer.cs
+++ b/DotCMIS/binding/atompub/atompub-writer.cs
@@ -145,14 +145,17 @@
{
string result = "";
- foreach (cmisProperty property in cmisObject.properties.Items)
+ if (cmisObject.properties != null && cmisObject.properties.Items != null)
{
- if (PropertyIds.Name == property.propertyDefinitionId && property is cmisPropertyString)
+ foreach (cmisProperty property in cmisObject.properties.Items)
{
- string[] values = ((cmisPropertyString)property).value;
- if (values != null && values.Length > 0)
+ if (PropertyIds.Name == property.propertyDefinitionId && property is cmisPropertyString)
{
- return values[0];
+ string[] values = ((cmisPropertyString)property).value;
+ if (values != null && values.Length > 0)
+ {
+ return values[0];
+ }
}
}
}