summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-06-19 17:26:12 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-06-19 17:26:12 +0200
commitc81b56c1c0057a7a68cfcc492ad1c1ad4f2369a9 (patch)
tree00c25a082bdee40115140acd537bbc70aa5ddd1a
parent649f9524cf43dcea2fdbef815623102b3c606197 (diff)
tracker/{pt,aruco}: don't allow opencv unwind on assert
It's gonna purposefully dereference a zero pointer to cause a crash without unwinding.
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp1
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp
index 0090aa12..f2a2e3b8 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.cpp
+++ b/tracker-aruco/ftnoir_tracker_aruco.cpp
@@ -54,6 +54,7 @@ aruco_tracker::aruco_tracker() :
adaptive_size_pos(0),
use_otsu(false)
{
+ cv::setBreakOnError(true);
// param 2 ignored for Otsu thresholding. it's required to use our fork of Aruco.
set_detector_params();
}
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index 0b012a5e..c49f7668 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -23,6 +23,8 @@ Tracker_PT::Tracker_PT() :
commands(0),
ever_success(false)
{
+ cv::setBreakOnError(true);
+
connect(s.b.get(), SIGNAL(saving()), this, SLOT(maybe_reopen_camera()), Qt::DirectConnection);
connect(&s.fov, SIGNAL(valueChanged(int)), this, SLOT(set_fov(int)), Qt::DirectConnection);
set_fov(s.fov);