fix assertion - Assertion '_elementPool.CurrentAllocs() == _elementPool.Untracked()' failed.

This commit is contained in:
dinghao188
2021-09-17 17:49:01 +08:00
parent a977397684
commit 9efb6b0b66
2 changed files with 5 additions and 5 deletions

View File

@@ -1077,7 +1077,7 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr )
StrPair endTag;
p = node->ParseDeep( p, &endTag, curLineNumPtr );
if ( !p ) {
DeleteNode( node );
_document->DeleteNode( node );
if ( !_document->Error() ) {
_document->SetError( XML_ERROR_PARSING, initialLineNum, 0);
}
@@ -1110,7 +1110,7 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr )
}
if ( !wellLocated ) {
_document->SetError( XML_ERROR_PARSING_DECLARATION, initialLineNum, "XMLDeclaration value=%s", decl->Value());
DeleteNode( node );
_document->DeleteNode( node );
break;
}
}
@@ -1145,7 +1145,7 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr )
}
if ( mismatch ) {
_document->SetError( XML_ERROR_MISMATCHED_ELEMENT, initialLineNum, "XMLElement name=%s", ele->Name());
DeleteNode( node );
_document->DeleteNode( node );
break;
}
}