Draw3dTargetsPipe returns immediately if coeffs are null (previously NPE crashlooped) (#485)

* Draw3dTargetsPipe returns immediately if coeffs are null

* fix lint
This commit is contained in:
shueja-personal
2022-10-08 06:26:37 -07:00
committed by GitHub
parent 5ac541642e
commit dafee954e0

View File

@@ -43,6 +43,11 @@ public class Draw3dTargetsPipe
@Override
protected Void process(Pair<Mat, List<TrackedTarget>> in) {
if (!params.shouldDraw) return null;
if (params.cameraCalibrationCoefficients == null
|| params.cameraCalibrationCoefficients.getCameraIntrinsicsMat() == null
|| params.cameraCalibrationCoefficients.getCameraExtrinsicsMat() == null) {
return null;
}
for (var target : in.getRight()) {
// draw convex hull