closes https://github.com/assimp/assimp/issues/1340: Fix handling of empty nodes in openddl-parser.

This commit is contained in:
kimkulling
2018-07-11 10:10:26 +02:00
parent a4a609e218
commit e13f6876bb
2 changed files with 12 additions and 0 deletions

View File

@@ -100,9 +100,15 @@ static bool isUnsignedIntegerType( Value::ValueType integerType ) {
}
static DDLNode *createDDLNode( Text *id, OpenDDLParser *parser ) {
// Basic checks
if( ddl_nullptr == id || ddl_nullptr == parser ) {
return ddl_nullptr;
}
// If the buffer is empty ( an empty node ) return nullptr
if ( ddl_nullptr == id->m_buffer ) {
return ddl_nullptr;
}
const std::string type( id->m_buffer );
DDLNode *parent( parser->top() );