Skip to content

Commit

Permalink
fix array out of range bugs in feature manager
Browse files Browse the repository at this point in the history
  • Loading branch information
qintonguav committed Aug 6, 2017
1 parent 141f069 commit e458254
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vins_estimator/src/feature_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ void FeatureManager::removeFront(int frame_count)
else
{
int j = WINDOW_SIZE - 1 - it->start_frame;
if (it->endFrame() < frame_count - 1)
continue;
it->feature_per_frame.erase(it->feature_per_frame.begin() + j);
if (it->feature_per_frame.size() == 0)
feature.erase(it);
Expand Down

0 comments on commit e458254

Please sign in to comment.