Fix for meshes with no texture coordinates.

This commit is contained in:
Andrzej Kapolka 2013-10-31 14:52:36 -07:00
parent 55de8ceb85
commit 70485a0ba9

View file

@ -615,8 +615,9 @@ void appendIndex(MeshData& data, QVector<int>& indices, int index) {
}
if (data.texCoordIndices.isEmpty()) {
vertex.texCoord = data.texCoords.at(index);
if (index < data.texCoords.size()) {
vertex.texCoord = data.texCoords.at(index);
}
} else {
int texCoordIndex = data.texCoordIndices.at(index);
if (texCoordIndex >= 0) {