Only show error once

This commit is contained in:
Emma Broman
2020-04-29 14:57:11 +02:00
parent c979e6613d
commit c463064170

View File

@@ -74,7 +74,7 @@ const std::vector<glm::dvec3> PathSegment::getControlPoints() const {
CameraPose PathSegment::traversePath(double dt) {
if (!_curve || !_rotationInterpolator || !_speedFunction) {
LERROR("Cannot traverse path. Curve type has not been properly defined.");
// TODO: handle better (abort path somehow)
return _start.pose;
}
@@ -153,6 +153,11 @@ void PathSegment::initCurve() {
LERROR("Could not create curve. Type does not exist!");
return;
}
if (!_curve || !_rotationInterpolator || !_speedFunction) {
LERROR("Curve type has not been properly initialized.");
return;
}
}
} // namespace openspace::autonavigation