summaryrefslogtreecommitdiff
path: root/profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'profile.cpp')
-rw-r--r--profile.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/profile.cpp b/profile.cpp
index 31d88cd..0c4967c 100644
--- a/profile.cpp
+++ b/profile.cpp
@@ -11,6 +11,14 @@ Profile::Profile(
const CalibrationTablePtr calibrationTableX)
: m_counters(pixels.counters)
{
+ if (!calibrationTableZ || !calibrationTableX)
+ {
+ std::cerr << __func__ << ": got invalid calibration tables"
+ << std::endl;
+
+ return;
+ }
+
static bool done{false};
if (!done) {
@@ -71,8 +79,8 @@ Profile::Profile(
// TODO: use only NaN (or zero?) everywhere
// NOTE: QJsonValue converts NaN to zero
if (qFuzzyIsNull(z) || std::isnan(z)) {
- qDebug() << "got nan z for discrete" << pixelDiscrete << leftMmZ
- << rightMmZ;
+ // qDebug() << "got nan z for discrete" << pixelDiscrete << leftMmZ
+ // << rightMmZ;
m_pointsMm.at(i) = {std::nan(""), std::nan("")};
continue;
}