Error fix DeleteChild

Added call to Unlink in XMLNode::DeleteChild() so that references to
node are removed before memory is unallocated. This will ensure the
child is removed from parent and that no pointers are referring to the
unallocated memory. (Code is now aligned with the code in
XMLNode::DeleteChildren() )
This commit is contained in:
Jarle Strand 2015-12-27 17:30:04 +01:00
parent 9c8582c7c3
commit 81abfd6d4c
1 changed files with 1 additions and 0 deletions

View File

@ -776,6 +776,7 @@ void XMLNode::DeleteChild( XMLNode* node )
TIXMLASSERT( node );
TIXMLASSERT( node->_document == _document );
TIXMLASSERT( node->_parent == this );
Unlink( node );
DeleteNode( node );
}