diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-08-02 16:26:55 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-08-02 16:26:55 +0200 |
| commit | 83e9ec28d5106ecd347453cf1020d3ca2be1b063 (patch) | |
| tree | 2574e45e9129ef6840db6a7ebee6eb6296735977 | |
| parent | 0333925e916acc47c25cdcfec0c3be3d695a825f (diff) | |
| download | snap-issue_461.tar.gz snap-issue_461.zip | |
TypeError (fix #461)issue_461
| -rw-r--r-- | threads.js | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -1731,15 +1731,18 @@ Process.prototype.blockReceiver = function () { Process.prototype.doPlaySoundUntilDone = function (name) { var sprite = this.homeContext.receiver; - if (this.context.activeAudio === null) { - this.context.activeAudio = sprite.playSound(name); - } - if (this.context.activeAudio.ended - || this.context.activeAudio.terminated) { - return null; + + if (name !== '') { + if (this.context.activeAudio === null) { + this.context.activeAudio = sprite.playSound(name); + } + if (this.context.activeAudio.ended + || this.context.activeAudio.terminated) { + return null; + } + this.pushContext('doYield'); + this.pushContext(); } - this.pushContext('doYield'); - this.pushContext(); }; Process.prototype.doStopAllSounds = function () { |
