diff --git a/code/FBXDocument.cpp b/code/FBXDocument.cpp index b007ad4bd..549c8e34c 100644 --- a/code/FBXDocument.cpp +++ b/code/FBXDocument.cpp @@ -412,9 +412,19 @@ MeshGeometry::MeshGeometry(const Element& element, const std::string& name, cons std::vector tempVerts; ReadVectorDataArray(tempVerts,Vertices); + if(tempVerts.empty()) { + FBXImporter::LogWarn("encountered mesh with no vertices"); + return; + } + std::vector tempFaces; ReadVectorDataArray(tempFaces,PolygonVertexIndex); + if(tempFaces.empty()) { + FBXImporter::LogWarn("encountered mesh with no faces"); + return; + } + vertices.reserve(tempFaces.size()); faces.reserve(tempFaces.size() / 3);