summaryrefslogtreecommitdiff
path: root/threads.js
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-08-17 18:07:12 +0200
committerGubolin <gubolin@fantasymail.de>2014-08-17 18:07:12 +0200
commit849e666a236c5037265b1c620bc536ec889dafae (patch)
tree6d08d1fca2b9c6ca092a71370c2dc9183cb8eb22 /threads.js
parent35974d8b61d0658ddb5af8907c4bb0512fc3feb7 (diff)
downloadsnap-849e666a236c5037265b1c620bc536ec889dafae.tar.gz
snap-849e666a236c5037265b1c620bc536ec889dafae.zip
camera block bugfixes
Diffstat (limited to 'threads.js')
-rw-r--r--threads.js10
1 files changed, 4 insertions, 6 deletions
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();
+ }
}
});
}