Skip to content

Commit cfe6452

Browse files
committed
Don't set if game is being destroyed
1 parent 4cfa29a commit cfe6452

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/renderer/webgl/WebGLRenderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@ var WebGLRenderer = new Class({
16081608

16091609
this.gl.deleteTexture(texture);
16101610

1611-
if (this.currentTextures[0] === texture)
1611+
if (this.currentTextures[0] === texture && !this.game.pendingDestroy)
16121612
{
16131613
// texture we just deleted is in use, so bind a blank texture
16141614
this.setBlankTexture(true);
@@ -2484,7 +2484,7 @@ var WebGLRenderer = new Class({
24842484
delete this.pipelines[key];
24852485
}
24862486

2487-
for (var index = 0; index < this.nativeTextures.length; ++index)
2487+
for (var index = 0; index < this.nativeTextures.length; index++)
24882488
{
24892489
this.deleteTexture(this.nativeTextures[index]);
24902490

0 commit comments

Comments
 (0)