Fix memory leak in OBJ loader when a mesh has no faces.
This commit is contained in:
@@ -308,7 +308,11 @@ aiMesh *ObjFileImporter::createTopology( const ObjFile::Model* pModel, const Obj
|
||||
if( !pObjMesh ) {
|
||||
return NULL;
|
||||
}
|
||||
ai_assert( NULL != pObjMesh );
|
||||
|
||||
if( pObjMesh->m_Faces.empty() ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
aiMesh* pMesh = new aiMesh;
|
||||
if( !pObjMesh->m_name.empty() ) {
|
||||
pMesh->mName.Set( pObjMesh->m_name );
|
||||
|
||||
Reference in New Issue
Block a user