Small conditional check in case someone has removed the animations property.

This commit is contained in:
photonstorm 2014-07-10 16:06:47 +01:00
parent 6a0b8b5e73
commit 34efa223cb

View file

@ -392,7 +392,11 @@ Phaser.Sprite.prototype.loadTexture = function (key, frame) {
else
{
this.setTexture(new PIXI.Texture(PIXI.BaseTextureCache[key]));
setFrame = !this.animations.loadFrameData(this.game.cache.getFrameData(key), frame);
if (this.animations)
{
setFrame = !this.animations.loadFrameData(this.game.cache.getFrameData(key), frame);
}
}
}