summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--facetracknoir/tracker.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
index ca505315..29855b31 100644
--- a/facetracknoir/tracker.cpp
+++ b/facetracknoir/tracker.cpp
@@ -119,7 +119,13 @@ void Tracker::run() {
QMutexLocker foo(&mtx);
for (int i = 0; i < 6; i++)
- mainApp->axis(i).headPos = newpose[i];
+ {
+ auto& axis = mainApp->axis(i);
+ int k = axis.opts.src;
+ if (k < 0 || k >= 6)
+ continue;
+ axis.headPos = newpose[k];
+ }
if (do_center) {
for (int i = 0; i < 6; i++)