From 3652c7066c5521aa1381f1982cbf3dacb0fb29aa Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Mon, 29 Apr 2013 13:17:37 -0400 Subject: [PATCH] Re-add viewer.source check in updateMulti() It should be redundant in normal operation, but may prevent a timer leak in case of a bug in the open/close path. --- src/viewer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/viewer.js b/src/viewer.js index af4b1822..a47d46d0 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1343,6 +1343,11 @@ function updateMulti( viewer ) { var beginTime; + if ( !viewer.source ) { + THIS[ viewer.hash ].updateRequestId = null; + return; + } + beginTime = +new Date(); updateOnce( viewer );