Merge pull request #254 from JayXon/onlyCheckElementPointerOnce

Only check ele pointer once
This commit is contained in:
Lee Thomason 2015-01-05 17:00:43 -08:00
commit deccff765f
1 changed files with 12 additions and 12 deletions

View File

@ -860,8 +860,9 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
}
XMLElement* ele = node->ToElement();
if ( ele ) {
// We read the end tag. Return it to the parent.
if ( ele && ele->ClosingType() == XMLElement::CLOSING ) {
if ( ele->ClosingType() == XMLElement::CLOSING ) {
if ( parentEnd ) {
ele->_value.TransferTo( parentEnd );
}
@ -872,7 +873,6 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
// Handle an end tag returned to this level.
// And handle a bunch of annoying errors.
if ( ele ) {
bool mismatch = false;
if ( endTag.Empty() && ele->ClosingType() == XMLElement::OPEN ) {
mismatch = true;