https://issues.shibboleth.net/jira/browse/CPPXT-50
[shibboleth/cpp-xmltooling.git] / xmltooling / AbstractXMLObject.cpp
index 0ebd079..58efeda 100644 (file)
@@ -244,6 +244,8 @@ DateTime* AbstractXMLObject::prepareForAssignment(DateTime* oldValue, const XMLC
 {
     delete oldValue;
     releaseThisandParentDOM();
+    if (!newValue || !*newValue)
+        return NULL;
     DateTime* ret = new DateTime(newValue);
     if (duration)
         ret->parseDuration();