Ver código fonte

Pointer assertion

Dmitry-Me 9 anos atrás
pai
commit
ba68a3aea6
1 arquivos alterados com 1 adições e 0 exclusões
  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() ) );
 }
 }