More consistency asserts
diff --git a/tinyxml2.cpp b/tinyxml2.cpp
index 0619bdf..57b6ed9 100755
--- a/tinyxml2.cpp
+++ b/tinyxml2.cpp
@@ -662,6 +662,7 @@
void XMLNode::DeleteChildren()
{
while( _firstChild ) {
+ TIXMLASSERT( _lastChild );
TIXMLASSERT( _firstChild->_document == _document );
XMLNode* node = _firstChild;
Unlink( node );
@@ -676,6 +677,7 @@
{
TIXMLASSERT( child );
TIXMLASSERT( child->_document == _document );
+ TIXMLASSERT( child->_parent == this );
if ( child == _firstChild ) {
_firstChild = _firstChild->_next;
}