From a17359d2df824bc4c5fcebad2b74acb5bad4934c Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Thu, 3 May 2018 17:26:25 -0700 Subject: [PATCH] Ensure a minimum of one joint-verts sets to prevent crash A baked FBX that has no joints will cause a crash without this. --- libraries/fbx/src/FBXReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index 86422ef70c..860d3ae5f4 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -1602,7 +1602,7 @@ FBXGeometry* FBXReader::extractFBXGeometry(const QVariantHash& mapping, const QS // NOTE: shapeVertices are in joint-frame std::vector shapeVertices; - shapeVertices.resize(geometry.joints.size()); + shapeVertices.resize(std::max(1, geometry.joints.size()) ); // find our special joints geometry.leftEyeJointIndex = modelIDs.indexOf(jointEyeLeftID);