Merge pull request #12159 from Zvork/compactvb

Fix potential assert exception in FBXMesh_Reader.cpp
This commit is contained in:
Seth Alves 2018-01-17 15:16:22 -08:00 committed by GitHub
commit fda4cf10b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -603,7 +603,7 @@ void FBXReader::buildModelMesh(FBXMesh& extractedMesh, const QString& url) {
if (!blendShape.normals.empty() && blendShape.tangents.empty()) {
// Fill with a dummy value to force tangents to be present if there are normals
blendShape.tangents.reserve(blendShape.normals.size());
std::fill_n(std::back_inserter(fbxMesh.tangents), blendShape.normals.size(), Vectors::UNIT_X);
std::fill_n(std::back_inserter(blendShape.tangents), blendShape.normals.size(), Vectors::UNIT_X);
}
}