From: Robert Kaiser Date: Sun, 14 Sep 2014 20:48:13 +0000 (+0200) Subject: make sure we only shut down the stream if we actually have an active stream X-Git-Tag: production~9 X-Git-Url: https://git-public.kairo.at/?p=tricorder.git;a=commitdiff_plain;h=b15d6e45225f9499c2151870524f57d5e7ff1b13;ds=sidebyside make sure we only shut down the stream if we actually have an active stream --- diff --git a/js/tricorder.js b/js/tricorder.js index 317fbca..50b0625 100644 --- a/js/tricorder.js +++ b/js/tricorder.js @@ -281,8 +281,10 @@ var gModSound = { window.requestAnimationFrame(gModSound.paintAnalyzerFrame); }, deactivate: function() { - gModSound.mDisplay.active = false; - gModSound.mAudio.stream.stop(); + if (gModSound.mDisplay.active) { + gModSound.mAudio.stream.stop(); + gModSound.mDisplay.active = false; + } gSounds.scan.pause(); }, }