summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/ftnoir_tracker_pt.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-02-17 04:40:53 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-02-17 04:41:10 +0100
commit38306b389951c69d050e3e4b929b442b5bd0ada5 (patch)
tree5f282d68ca80bae8e64000ceb7315ff12c6efa1c /tracker-pt/ftnoir_tracker_pt.h
parent925c0811d6b24069eb9f527c2c02301cc1ba5ca4 (diff)
tracker/pt: protect get_n_points()
There's a race here since further accesses to the points array aren't protected by a mutex in the extractor class. There's no race in "get_points()" in the extractor since it's only used in same thread where updates take place.
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.h')
-rw-r--r--tracker-pt/ftnoir_tracker_pt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.h b/tracker-pt/ftnoir_tracker_pt.h
index dff0c30a..5f30c66f 100644
--- a/tracker-pt/ftnoir_tracker_pt.h
+++ b/tracker-pt/ftnoir_tracker_pt.h
@@ -41,7 +41,7 @@ public:
void data(double* data) override;
Affine pose() { return point_tracker.pose(); }
- int get_n_points() { return point_extractor.get_points().size(); }
+ int get_n_points() { return point_extractor.get_n_points(); }
bool get_cam_info(CamInfo* info) { QMutexLocker lock(&camera_mtx); return camera.get_info(*info); }
public slots:
void apply_settings();