Explorar o código

Merge pull request #460 from Dmitry-Me/pointerAssertion

Pointer assertion for contract clarity
Lee Thomason %!s(int64=9) %!d(string=hai) anos
pai
achega
1043f6feed
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      tinyxml2.cpp

+ 1 - 0
tinyxml2.cpp

@@ -149,6 +149,7 @@ void StrPair::TransferTo( StrPair* other )
     // This in effect implements the assignment operator by "moving"
     // ownership (as in auto_ptr).
 
+    TIXMLASSERT( other != 0 );
     TIXMLASSERT( other->_flags == 0 );
     TIXMLASSERT( other->_start == 0 );
     TIXMLASSERT( other->_end == 0 );