diff --git a/src/igl/opengl/RenderPipelineState.cpp b/src/igl/opengl/RenderPipelineState.cpp index eeee332444..c6e3e65a76 100644 --- a/src/igl/opengl/RenderPipelineState.cpp +++ b/src/igl/opengl/RenderPipelineState.cpp @@ -275,8 +275,8 @@ void RenderPipelineState::bindVertexAttributes(size_t bufferIndex, size_t buffer } #endif - const auto attribList = static_cast(desc_.vertexInputState.get()) - ->getAssociatedAttributes(bufferIndex); + const auto& attribList = static_cast(desc_.vertexInputState.get()) + ->getAssociatedAttributes(bufferIndex); auto& locations = bufferAttribLocations_[bufferIndex]; // attributeList and locations should have an 1-to-1 correspondence