Fix segfault caused by FBX file with missing face #2614
This commit is contained in:
@@ -610,8 +610,12 @@ void MeshGeometry::ReadVertexDataMaterials(std::vector<int>& materials_out, cons
|
||||
const std::string& ReferenceInformationType)
|
||||
{
|
||||
const size_t face_count = m_faces.size();
|
||||
ai_assert(face_count);
|
||||
|
||||
if(face_count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// materials are handled separately. First of all, they are assigned per-face
|
||||
// and not per polyvert. Secondly, ReferenceInformationType=IndexToDirect
|
||||
// has a slightly different meaning for materials.
|
||||
|
||||
Reference in New Issue
Block a user