From a1ba3d77c8dcc896223bcbe4f08b7c3f207e3c3c Mon Sep 17 00:00:00 2001 From: Fan Jiang Date: Tue, 10 Dec 2024 17:25:12 -0500 Subject: [PATCH] Fix essential matrix factor --- gtsam/slam/EssentialMatrixFactor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/slam/EssentialMatrixFactor.h b/gtsam/slam/EssentialMatrixFactor.h index 601f8e94e..5d38cb234 100644 --- a/gtsam/slam/EssentialMatrixFactor.h +++ b/gtsam/slam/EssentialMatrixFactor.h @@ -71,7 +71,7 @@ class EssentialMatrixFactor : public NoiseModelFactorN { std::shared_ptr K) : Base(model, key) { #ifndef NDEBUG - if (K->empty()) throw; + if (!K) throw; #endif vA_ = EssentialMatrix::Homogeneous(K->calibrate(pA)); vB_ = EssentialMatrix::Homogeneous(K->calibrate(pB));