diff --git a/src/collision/shapes/ConcaveMeshShape.cpp b/src/collision/shapes/ConcaveMeshShape.cpp index 084e9265..317a1c65 100644 --- a/src/collision/shapes/ConcaveMeshShape.cpp +++ b/src/collision/shapes/ConcaveMeshShape.cpp @@ -131,7 +131,7 @@ void ConcaveMeshShape::getTriangleVerticesWithIndexPointer(int32 subPart, int32 for (int k=0; k < 3; k++) { // Get the index of the current vertex in the triangle - int vertexIndex; + int vertexIndex = 0; if (indexType == TriangleVertexArray::INDEX_INTEGER_TYPE) { vertexIndex = ((uint*)vertexIndexPointer)[k]; } @@ -155,6 +155,9 @@ void ConcaveMeshShape::getTriangleVerticesWithIndexPointer(int32 subPart, int32 outTriangleVertices[k][1] = decimal(vertices[1]) * mScaling.y; outTriangleVertices[k][2] = decimal(vertices[2]) * mScaling.z; } + else { + assert(false); + } } }