Only check ele pointer once
This commit is contained in:
@@ -862,8 +862,9 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
|
|||||||
}
|
}
|
||||||
|
|
||||||
XMLElement* ele = node->ToElement();
|
XMLElement* ele = node->ToElement();
|
||||||
|
if ( ele ) {
|
||||||
// We read the end tag. Return it to the parent.
|
// We read the end tag. Return it to the parent.
|
||||||
if ( ele && ele->ClosingType() == XMLElement::CLOSING ) {
|
if ( ele->ClosingType() == XMLElement::CLOSING ) {
|
||||||
if ( parentEnd ) {
|
if ( parentEnd ) {
|
||||||
ele->_value.TransferTo( parentEnd );
|
ele->_value.TransferTo( parentEnd );
|
||||||
}
|
}
|
||||||
@@ -874,7 +875,6 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
|
|||||||
|
|
||||||
// Handle an end tag returned to this level.
|
// Handle an end tag returned to this level.
|
||||||
// And handle a bunch of annoying errors.
|
// And handle a bunch of annoying errors.
|
||||||
if ( ele ) {
|
|
||||||
bool mismatch = false;
|
bool mismatch = false;
|
||||||
if ( endTag.Empty() && ele->ClosingType() == XMLElement::OPEN ) {
|
if ( endTag.Empty() && ele->ClosingType() == XMLElement::OPEN ) {
|
||||||
mismatch = true;
|
mismatch = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user