Added handling of when mesh->texcos is NULL

This commit is contained in:
Robert Osfield
2016-06-25 15:40:30 +01:00
parent 3609d84cef
commit 3376bfbfc8

View File

@@ -913,7 +913,7 @@ static void addVertex(
{
osg::Vec3Array* vertices = (osg::Vec3Array*)geometry->getVertexArray();
osg::Vec3Array* normals = (osg::Vec3Array*)geometry->getNormalArray();
osg::Vec2Array* texCoords = (osg::Vec2Array*)geometry->getTexCoordArray(0);
osg::Vec2Array* texCoords = mesh->texcos ? (osg::Vec2Array*)geometry->getTexCoordArray(0) : 0;
unsigned int index = remappedFace.face->index[i];
if (origToNewMapping[index] == -1)