diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 41270ac02a..8ed969e8fa 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -2387,7 +2387,14 @@ var WebGLRenderer = new Class({ createAttribLocation: function (program, name) { var attrib = new WebGLAttribLocationWrapper(this.gl, program, name); - this.glAttribLocationWrappers.push(attrib); + if (attrib.webGLAttribLocation >= 0) + { + this.glAttribLocationWrappers.push(attrib); + } + else + { + attrib.destroy(); + } return attrib; },