Browse Source

Merge pull request #577 from matvelloso/master

Fixed small issue when calling dispose on Google Chrome
Temechon 10 years ago
parent
commit
60c4f2f280
1 changed files with 3 additions and 1 deletions
  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;
             }
         }