amassari 2005/04/07 08:08:57 Modified: c/src/xercesc/dom/impl DOMParentNode.cpp Log: appendChild now throws an exception when a NULL pointer is given (jira# 1401) Revision Changes Path 1.18 +5 -1 xml-xerces/c/src/xercesc/dom/impl/DOMParentNode.cpp Index: DOMParentNode.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMParentNode.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- DOMParentNode.cpp 8 Sep 2004 13:55:52 -0000 1.17 +++ DOMParentNode.cpp 7 Apr 2005 15:08:57 -0000 1.18 @@ -139,6 +139,10 @@ DOMNode *DOMParentNode::insertBefore(DOMNode *newChild, DOMNode *refChild) { + //not really in the specs, but better than nothing + if(newChild==NULL) + throw DOMException(DOMException::HIERARCHY_REQUEST_ERR,0, GetDOMParentNodeMemoryManager); + DOMNodeImpl *thisNodeImpl = castToNodeImpl(this); if (thisNodeImpl->isReadOnly()) throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, 0, GetDOMParentNodeMemoryManager);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]