Merge pull request #2097 from pnstickne/wip-2092

Fixes edge case when TilingSprite removed before render
This commit is contained in:
Richard Davey 2015-09-19 13:09:53 +03:00
commit 11de8b1944

View file

@ -496,10 +496,14 @@ PIXI.TilingSprite.prototype.getBounds = function()
PIXI.TilingSprite.prototype.destroy = function () {
this.canvasBuffer.destroy();
PIXI.Sprite.prototype.destroy.call(this);
if (this.canvasBuffer)
{
this.canvasBuffer.destroy();
this.canvasBuffer = null;
}
this.tileScale = null;
this.tileScaleOffset = null;
this.tilePosition = null;