فهرست منبع

Merge remote-tracking branch 'origin/master' into leethomason/security-review

Lee Thomason 2 ماه پیش
والد
کامیت
24725dd39c
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      tinyxml2.cpp

+ 1 - 2
tinyxml2.cpp

@@ -2351,11 +2351,10 @@ static FILE* callfopen( const char* filepath, const char* mode )
 }
 }
 
 
 void XMLDocument::DeleteNode( XMLNode* node )	{   
 void XMLDocument::DeleteNode( XMLNode* node )	{   
-    TIXMLASSERT( node );
-    TIXMLASSERT(node->_document == this );
     if(node == 0) {
     if(node == 0) {
         return; // check for null pointer
         return; // check for null pointer
     }
     }
+    TIXMLASSERT(node->_document == this);
     if (node->_parent) {
     if (node->_parent) {
         node->_parent->DeleteChild( node );
         node->_parent->DeleteChild( node );
     }
     }