mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
Headless tilesprite crash fix
Fixes issue https://github.com/photonstorm/phaser/issues/4297
This commit is contained in:
parent
4c24799eac
commit
cd6488e8db
1 changed files with 2 additions and 2 deletions
|
@ -420,7 +420,7 @@ var TileSprite = new Class({
|
|||
var fw = this.potWidth;
|
||||
var fh = this.potHeight;
|
||||
|
||||
if (!this.renderer.gl)
|
||||
if (!this.renderer || !this.renderer.gl)
|
||||
{
|
||||
fw = frame.cutWidth;
|
||||
fh = frame.cutHeight;
|
||||
|
@ -439,7 +439,7 @@ var TileSprite = new Class({
|
|||
fw, fh
|
||||
);
|
||||
|
||||
if (this.renderer.gl)
|
||||
if (this.renderer && this.renderer.gl)
|
||||
{
|
||||
this.fillPattern = this.renderer.canvasToTexture(canvas, this.fillPattern);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue