diff --git a/src/player.js b/src/player.js index fa9a33e6..23a4e0b9 100644 --- a/src/player.js +++ b/src/player.js @@ -113,8 +113,10 @@ Player.prototype.stop = function(ev) { Player.prototype.destroy = function() { this.pause(); this.source.destroy(); - this.renderer.destroy(); - this.audioOut.destroy(); + if(this.renderer) + this.renderer.destroy(); + if(this.audioOut) + this.audioOut.destroy(); }; Player.prototype.seek = function(time) {