We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cfa29a commit cfe6452Copy full SHA for cfe6452
1 file changed
src/renderer/webgl/WebGLRenderer.js
@@ -1608,7 +1608,7 @@ var WebGLRenderer = new Class({
1608
1609
this.gl.deleteTexture(texture);
1610
1611
- if (this.currentTextures[0] === texture)
+ if (this.currentTextures[0] === texture && !this.game.pendingDestroy)
1612
{
1613
// texture we just deleted is in use, so bind a blank texture
1614
this.setBlankTexture(true);
@@ -2484,7 +2484,7 @@ var WebGLRenderer = new Class({
2484
delete this.pipelines[key];
2485
}
2486
2487
- for (var index = 0; index < this.nativeTextures.length; ++index)
+ for (var index = 0; index < this.nativeTextures.length; index++)
2488
2489
this.deleteTexture(this.nativeTextures[index]);
2490
0 commit comments