Skip to content

Commit 77a3bfe

Browse files
committed
loadTexture guard.
1 parent 5b0c751 commit 77a3bfe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/gameobjects/components/Core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ Phaser.Component.Core.init = function (game, x, y, key, frame) {
3636
this.animations = new Phaser.AnimationManager(this);
3737
}
3838

39-
if (this.components.LoadTexture)
39+
if (this.components.LoadTexture && key !== null)
4040
{
4141
this.loadTexture(key, frame);
4242
}
4343

44-
// console.log('init', this.position, key);
44+
// console.log('init', this);
4545

4646
};
4747

0 commit comments

Comments
 (0)