Parcourir la source

Merge pull request #543 from Dmitry-Me/pointerAssertInShallowEqual

Pointer assertion
Lee Thomason il y a 9 ans
Parent
commit
fc05f63575
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      tinyxml2.cpp

+ 1 - 0
tinyxml2.cpp

@@ -1133,6 +1133,7 @@ XMLNode* XMLText::ShallowClone( XMLDocument* doc ) const
 
 
 bool XMLText::ShallowEqual( const XMLNode* compare ) const
 bool XMLText::ShallowEqual( const XMLNode* compare ) const
 {
 {
+    TIXMLASSERT( compare );
     const XMLText* text = compare->ToText();
     const XMLText* text = compare->ToText();
     return ( text && XMLUtil::StringEqual( text->Value(), Value() ) );
     return ( text && XMLUtil::StringEqual( text->Value(), Value() ) );
 }
 }