From ed2a407a88ee8ee56e31f43e52ebf93882c94c2f Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 12 Dec 2014 10:38:48 +0300 Subject: [PATCH] Add more pointer pre-asserts --- tinyxml2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 4ce2184..57a82c1 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -663,6 +663,7 @@ void XMLNode::DeleteChild( XMLNode* node ) XMLNode* XMLNode::InsertEndChild( XMLNode* addThis ) { + TIXMLASSERT( addThis ); if ( addThis->_document != _document ) { TIXMLASSERT( false ); return 0; @@ -696,6 +697,7 @@ XMLNode* XMLNode::InsertEndChild( XMLNode* addThis ) XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis ) { + TIXMLASSERT( addThis ); if ( addThis->_document != _document ) { TIXMLASSERT( false ); return 0;