Skip to content

Commit 126ec19

Browse files
committed
TileSprite.destroy has been renamed to preDestroy to take advantage of the preDestroy callback system.
1 parent c51742a commit 126ec19

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/gameobjects/tilesprite/TileSprite.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,15 @@ var TileSprite = new Class({
269269
},
270270

271271
/**
272-
* [description]
272+
* Internal destroy handler, called as part of the destroy process.
273273
*
274-
* @method Phaser.GameObjects.TileSprite#destroy
275-
* @since 3.0.0
274+
* @method Phaser.GameObjects.TileSprite#preDestroy
275+
* @protected
276+
* @since 3.9.0
276277
*/
277-
destroy: function ()
278+
preDestroy: function ()
278279
{
279-
if (this.renderer.gl)
280+
if (this.renderer && this.renderer.gl)
280281
{
281282
this.renderer.deleteTexture(this.tileTexture);
282283
}
@@ -288,7 +289,6 @@ var TileSprite = new Class({
288289
this.canvasBuffer = null;
289290

290291
this.renderer = null;
291-
this.visible = false;
292292
}
293293

294294
});

0 commit comments

Comments
 (0)