BaseSoundManager.forEachActiveSound will now only invoke the callback if the sound actually exists and isn't pending removal. Fix #3383

This commit is contained in:
Richard Davey 2019-10-02 12:50:10 +01:00
parent 718f8acf29
commit 89c30fe42f

View file

@ -505,7 +505,7 @@ var BaseSoundManager = new Class({
this.sounds.forEach(function (sound, index)
{
if (!sound.pendingRemove)
if (sound && !sound.pendingRemove)
{
callback.call(scope || _this, sound, index, _this.sounds);
}