[3053648] Obj: segfault when first line is a material.
Add test file to reproduce the issues. Thanks to Ingo Kresse for providing the patch. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@807 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -633,6 +633,11 @@ void ObjFileParser::createMesh()
|
||||
// Returns true, if a new mesh must be created.
|
||||
bool ObjFileParser::needsNewMesh( const std::string &rMaterialName )
|
||||
{
|
||||
if(m_pModel->m_pCurrentMesh == 0)
|
||||
{
|
||||
// No mesh data yet
|
||||
return true;
|
||||
}
|
||||
bool newMat = false;
|
||||
int matIdx = getMaterialIndex( rMaterialName );
|
||||
int curMatIdx = m_pModel->m_pCurrentMesh->m_uiMaterialIndex;
|
||||
|
||||
Reference in New Issue
Block a user