From 849e666a236c5037265b1c620bc536ec889dafae Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sun, 17 Aug 2014 18:07:12 +0200 Subject: camera block bugfixes --- threads.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'threads.js') diff --git a/threads.js b/threads.js index 8e2be3f..39537c0 100644 --- a/threads.js +++ b/threads.js @@ -2821,10 +2821,6 @@ Process.prototype.doStreamCamera = function () { } context.drawImage(video, 0, 0, video.width, video.height); stage.changed(); - - var motionCanvas = this.getCameraMotionCanvas(); - this.getCameraDirection(motionCanvas); - // dry-run to update lastCameraMotion } catch (e) { if (e.name !== 'NS_ERROR_NOT_AVAILABLE') { // https://bugzilla.mozilla.org/show_bug.cgi?id=879717 @@ -2841,8 +2837,10 @@ Process.prototype.doStopCamera = function () { var stage = this.homeContext.receiver.parentThatIsA(StageMorph); if (stage) { stage.threads.processes.forEach(function (thread) { - if (thread.context.activeStream) { - thread.popContext(); + if (thread.context) { + if (thread.context.activeStream) { + thread.popContext(); + } } }); } -- cgit v1.3.1