From 7e12257ebc98bfbeca275b000270415f3332869d Mon Sep 17 00:00:00 2001 From: Gordon MacPherson Date: Mon, 26 Aug 2019 22:44:25 +0100 Subject: [PATCH] Fix segfault #2614 --- code/FBX/FBXMeshGeometry.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/FBX/FBXMeshGeometry.cpp b/code/FBX/FBXMeshGeometry.cpp index e60fc25e2..5c9a0e309 100644 --- a/code/FBX/FBXMeshGeometry.cpp +++ b/code/FBX/FBXMeshGeometry.cpp @@ -610,7 +610,10 @@ void MeshGeometry::ReadVertexDataMaterials(std::vector& 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