Merge pull request #4910 from ZappoMan/avoidSegregateMeshGroupsCrash

workaround for segregateMeshGroups() crash
This commit is contained in:
Clément Brisset 2015-05-18 22:19:28 +02:00
commit cc63787eb1

View file

@ -2056,6 +2056,12 @@ void Model::segregateMeshGroups() {
const FBXGeometry& geometry = _geometry->getFBXGeometry();
const QVector<NetworkMesh>& networkMeshes = _geometry->getMeshes();
// all of our mesh vectors must match in size
if (networkMeshes.size() != geometry.meshes.size() ||
geometry.meshes.size() != _meshStates.size()) {
qDebug() << "WARNING!!!! Mesh Sizes don't match! We will not segregate mesh groups yet.";
return;
}
// Run through all of the meshes, and place them into their segregated, but unsorted buckets
for (int i = 0; i < networkMeshes.size(); i++) {