Merge pull request #240 from Dmitry-Me/simplifyNodeOwnershipTracking

Even more pointer pre-asserts
This commit is contained in:
Lee Thomason 2014-12-12 15:37:22 -08:00
commit ee2c46928e
1 changed files with 2 additions and 0 deletions

View File

@ -669,6 +669,7 @@ void XMLNode::DeleteChild( XMLNode* node )
XMLNode* XMLNode::InsertEndChild( XMLNode* addThis ) XMLNode* XMLNode::InsertEndChild( XMLNode* addThis )
{ {
TIXMLASSERT( addThis );
if ( addThis->_document != _document ) { if ( addThis->_document != _document ) {
TIXMLASSERT( false ); TIXMLASSERT( false );
return 0; return 0;
@ -702,6 +703,7 @@ XMLNode* XMLNode::InsertEndChild( XMLNode* addThis )
XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis ) XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis )
{ {
TIXMLASSERT( addThis );
if ( addThis->_document != _document ) { if ( addThis->_document != _document ) {
TIXMLASSERT( false ); TIXMLASSERT( false );
return 0; return 0;