add check for audioengine

This commit is contained in:
Eric Rosenbaum 2017-01-06 16:24:16 -05:00
parent 18c88c8ee0
commit bd8fdad1d4

View file

@ -67,7 +67,7 @@ RenderedTarget.prototype.initDrawable = function () {
* Audio player
*/
this.audioPlayer = null;
if (this.runtime) {
if (this.runtime && this.runtime.audioEngine) {
if (this.isOriginal) {
this.sprite.audioPlayer = this.runtime.audioEngine.createPlayer();
this.sprite.audioPlayer.loadSounds(this.sprite.sounds);