Explorar o código

Merge pull request #577 from matvelloso/master

Fixed small issue when calling dispose on Google Chrome
Temechon %!s(int64=10) %!d(string=hai) anos
pai
achega
60c4f2f280
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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;
             }
         }