Skip to content

Commit a840216

Browse files
committed
Tidied up how crop destroys itself.
1 parent 94a0dbe commit a840216

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/gameobjects/Text.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,6 @@ Phaser.Text.prototype.destroy = function (destroyChildren) {
224224

225225
this.texture.destroy(true);
226226

227-
PIXI.CanvasPool.remove(this);
228-
229227
Phaser.Component.Destroy.prototype.destroy.call(this, destroyChildren);
230228

231229
};

src/gameobjects/components/Destroy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Phaser.Component.Destroy.prototype = {
102102
if (this._crop)
103103
{
104104
this._crop = null;
105+
this.cropRect = null;
105106
}
106107

107108
if (this._frame)

0 commit comments

Comments
 (0)