Fixed canvas destroy if undefined.

This commit is contained in:
photonstorm 2015-02-18 14:54:11 +00:00
parent ef3cb1f31d
commit 58d37b51fe

View file

@ -140,7 +140,7 @@ Phaser.Text.prototype.destroy = function (destroyChildren) {
this.texture.destroy(true);
if (this.canvas.parentNode)
if (this.canvas && this.canvas.parentNode)
{
this.canvas.parentNode.removeChild(this.canvas);
}