Skip to content

Commit b32acec

Browse files
committed
Merge pull request flann-lib#173 from chinakook/master
Update nn_index.h
2 parents 5c4e348 + 2305182 commit b32acec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cpp/flann/algorithms/nn_index.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ class NNIndex : public IndexBase
704704
return id;
705705
}
706706
size_t point_index = size_t(-1);
707-
if (ids_[id]==id) {
707+
if (id < ids_.size() && ids_[id]==id) {
708708
return id;
709709
}
710710
else {

0 commit comments

Comments
 (0)