Skip to content

Commit 89c30fe

Browse files
committed
BaseSoundManager.forEachActiveSound will now only invoke the callback if the sound actually exists and isn't pending removal. Fix phaserjs#3383
1 parent 718f8ac commit 89c30fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/sound/BaseSoundManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ var BaseSoundManager = new Class({
505505

506506
this.sounds.forEach(function (sound, index)
507507
{
508-
if (!sound.pendingRemove)
508+
if (sound && !sound.pendingRemove)
509509
{
510510
callback.call(scope || _this, sound, index, _this.sounds);
511511
}

0 commit comments

Comments
 (0)