AC3D: Throw exception when encountering a bad vertex index

This commit is contained in:
Turo Lamminen
2015-04-01 16:22:46 +03:00
parent 16c57ab1d3
commit bf5c9413f9

View File

@@ -632,6 +632,10 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
face.mIndices[1] = cur++;
// copy vertex positions
if (it2 == (*it).entries.end() ) {
throw DeadlyImportError("AC3D: Bad line");
}
ai_assert((*it2).first < object.vertices.size());
*vertices++ = object.vertices[(*it2).first];
// copy texture coordinates