Fix out of bounds when the model url is incorrect

This commit is contained in:
luiscuenca 2019-04-08 10:36:58 -07:00
parent c902e8392c
commit d9eaa2076d
No known key found for this signature in database
GPG key ID: 2387ECD129A6961D

View file

@ -166,7 +166,9 @@ void HFMModel::computeKdops() {
glm::vec3(INV_SQRT_3, INV_SQRT_3, -INV_SQRT_3),
glm::vec3(INV_SQRT_3, -INV_SQRT_3, -INV_SQRT_3)
};
if (joints.size() != shapeVertices.size()) {
return;
}
// now that all joints have been scanned compute a k-Dop bounding volume of mesh
for (int i = 0; i < joints.size(); ++i) {
HFMJoint& joint = joints[i];