diff --git a/Tone/source/Microphone.js b/Tone/source/Microphone.js index f4b3ae74..59a2dc94 100644 --- a/Tone/source/Microphone.js +++ b/Tone/source/Microphone.js @@ -90,8 +90,9 @@ define(["Tone/core/Tone", "Tone/source/Source"], function(Tone){ */ Tone.Microphone.prototype.dispose = function() { Tone.Source.prototype.dispose.call(this); - //this._stream.disconnect(); - this._mediaStream.disconnect(); + if (this._mediaStream) { + this._mediaStream.disconnect(); + } this._stream = null; this._mediaStream = null; };