diff --git a/src/dlo/odom.cc b/src/dlo/odom.cc index 06a1fcc..254cd1a 100644 --- a/src/dlo/odom.cc +++ b/src/dlo/odom.cc @@ -1213,6 +1213,9 @@ void dlo::OdomNode::setAdaptiveParams() { **/ void dlo::OdomNode::pushSubmapIndices(std::vector dists, int k, std::vector frames) { + // make sure dists is not empty + if (!dists.size()) { return; } + // maintain max heap of at most k elements std::priority_queue pq;