From b15d6e45225f9499c2151870524f57d5e7ff1b13 Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Sun, 14 Sep 2014 22:48:13 +0200 Subject: [PATCH] make sure we only shut down the stream if we actually have an active stream --- js/tricorder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); }, } -- 2.35.3