diff --git a/src/gameobjects/Image.js b/src/gameobjects/Image.js index 65679081..2e6d7ee4 100644 --- a/src/gameobjects/Image.js +++ b/src/gameobjects/Image.js @@ -369,11 +369,6 @@ Phaser.Image.prototype.kill = function() { */ Phaser.Image.prototype.destroy = function() { - if (this.filters) - { - this.filters = null; - } - if (this.parent) { this.parent.remove(this); @@ -393,6 +388,8 @@ Phaser.Image.prototype.destroy = function() { this.exists = false; this.visible = false; + this.filters = null; + this.mask = null; this.game = null; } diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 232c94ef..9e260810 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -491,11 +491,6 @@ Phaser.Sprite.prototype.kill = function() { */ Phaser.Sprite.prototype.destroy = function() { - if (this.filters) - { - this.filters = null; - } - if (this.parent) { this.parent.remove(this); @@ -525,6 +520,8 @@ Phaser.Sprite.prototype.destroy = function() { this.exists = false; this.visible = false; + this.filters = null; + this.mask = null; this.game = null; };