Pointer asserts in GetStr()

This commit is contained in:
Dmitry-Me 2015-01-01 17:47:40 +03:00
parent b4e81b014e
commit 5ffa73e979
1 changed files with 3 additions and 0 deletions

View File

@ -186,6 +186,8 @@ void StrPair::CollapseWhitespace()
const char* StrPair::GetStr()
{
TIXMLASSERT( _start );
TIXMLASSERT( _end );
if ( _flags & NEEDS_FLUSH ) {
*_end = 0;
_flags ^= NEEDS_FLUSH;
@ -267,6 +269,7 @@ const char* StrPair::GetStr()
}
_flags = (_flags & NEEDS_DELETE);
}
TIXMLASSERT( _start );
return _start;
}