diff --git a/cocos/2d/CCParticleSystemQuad.cpp b/cocos/2d/CCParticleSystemQuad.cpp index 1721ccd604a0..1b392f3e34d1 100644 --- a/cocos/2d/CCParticleSystemQuad.cpp +++ b/cocos/2d/CCParticleSystemQuad.cpp @@ -545,10 +545,15 @@ void ParticleSystemQuad::setTotalParticles(int tp) void ParticleSystemQuad::setupVBOandVAO() { - // clean VAO glDeleteBuffers(2, &_buffersVBO[0]); - glDeleteVertexArrays(1, &_VAOname); - GL::bindVAO(0); + + // clean VAO + if (_VAOname) + { + glDeleteVertexArrays(1, &_VAOname); + GL::bindVAO(0); + _VAOname = 0; + } glGenVertexArrays(1, &_VAOname); GL::bindVAO(_VAOname);