Kaynağa Gözat

checking for outputAudioNode before disconnecting it or else we get an exception on Chrome

Mat V 10 yıl önce
ebeveyn
işleme
c2ab0f09ec
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      Babylon/Audio/babylon.soundtrack.ts

+ 3 - 1
Babylon/Audio/babylon.soundtrack.ts

@@ -37,7 +37,9 @@
                 while (this.soundCollection.length) {
                     this.soundCollection[0].dispose();
                 }
-                this._outputAudioNode.disconnect();
+                if (this._outputAudioNode) {
+                    this._outputAudioNode.disconnect();
+                }
                 this._outputAudioNode = null;
             }
         }