Skip to content

Commit

Permalink
Hotfix for crash when dists is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyjchen committed Apr 10, 2023
1 parent 02da8ab commit 3a183cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dlo/odom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,9 @@ void dlo::OdomNode::setAdaptiveParams() {
**/
void dlo::OdomNode::pushSubmapIndices(std::vector<float> dists, int k, std::vector<int> frames) {

// make sure dists is not empty
if (!dists.size()) { return; }

// maintain max heap of at most k elements
std::priority_queue<float> pq;

Expand Down

0 comments on commit 3a183cd

Please sign in to comment.