diff --git a/cocos/renderer/backend/opengl/CommandBufferGL.cpp b/cocos/renderer/backend/opengl/CommandBufferGL.cpp index ef2024a378..72732c37ec 100644 --- a/cocos/renderer/backend/opengl/CommandBufferGL.cpp +++ b/cocos/renderer/backend/opengl/CommandBufferGL.cpp @@ -329,7 +329,7 @@ void CommandBufferGL::bindVertexBuffer(ProgramGL *program) const const auto& vertexLayouts = getVertexLayouts(); for (const auto& vertexBuffer : _vertexBuffers) { - if (! vertexBuffer || attributeInfos.empty()) + if (! vertexBuffer) continue; glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer->getHandler());