Skip to content

Commit ec06e8d

Browse files
committed
Update tinyxml2
1 parent 1d6f905 commit ec06e8d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ This file has been modified from its original version by Amazon:
119119
#define TIXML_VSNPRINTF vsnprintf
120120
static inline int TIXML_VSCPRINTF( const char* format, va_list va )
121121
{
122+
if (!format) {
123+
return 0;
124+
}
122125
int len = vsnprintf( 0, 0, format, va );
123126
TIXMLASSERT( len >= 0 );
124127
return len;
@@ -2356,8 +2359,10 @@ static FILE* callfopen( const char* filepath, const char* mode )
23562359
}
23572360

23582361
void XMLDocument::DeleteNode( XMLNode* node ) {
2359-
TIXMLASSERT( node );
2360-
TIXMLASSERT(node->_document == this );
2362+
if(node == 0) {
2363+
return; // check for null pointer
2364+
}
2365+
TIXMLASSERT(node->_document == this);
23612366
if (node->_parent) {
23622367
node->_parent->DeleteChild( node );
23632368
}

0 commit comments

Comments
 (0)