summaryrefslogtreecommitdiff
path: root/thirdparty/assimp/code/FBX/FBXMeshGeometry.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-09-01 22:14:17 +0200
committerGitHub <noreply@github.com>2019-09-01 22:14:17 +0200
commit7dceba3afcbfde4c4b5d5549c0c907de87b7f421 (patch)
treea796d880350bd1b6e3f6b95223f8afb1b1e2cd3d /thirdparty/assimp/code/FBX/FBXMeshGeometry.cpp
parent62c0185cb3c2c808c78e9107333a3c4bdb6dadfd (diff)
parentad214c03560d721d9b8bbff03835fc7fa4884943 (diff)
Merge pull request #31587 from RevoluPowered/feature/fbx-importer
FBX Importer
Diffstat (limited to 'thirdparty/assimp/code/FBX/FBXMeshGeometry.cpp')
-rw-r--r--thirdparty/assimp/code/FBX/FBXMeshGeometry.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/thirdparty/assimp/code/FBX/FBXMeshGeometry.cpp b/thirdparty/assimp/code/FBX/FBXMeshGeometry.cpp
index 44a0264ca0..5c9a0e309d 100644
--- a/thirdparty/assimp/code/FBX/FBXMeshGeometry.cpp
+++ b/thirdparty/assimp/code/FBX/FBXMeshGeometry.cpp
@@ -115,7 +115,6 @@ MeshGeometry::MeshGeometry(uint64_t id, const Element& element, const std::strin
if(tempVerts.empty()) {
FBXImporter::LogWarn("encountered mesh with no vertices");
- return;
}
std::vector<int> tempFaces;
@@ -123,7 +122,6 @@ MeshGeometry::MeshGeometry(uint64_t id, const Element& element, const std::strin
if(tempFaces.empty()) {
FBXImporter::LogWarn("encountered mesh with no faces");
- return;
}
m_vertices.reserve(tempFaces.size());
@@ -612,7 +610,10 @@ 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