Skip to content

Commit

Permalink
fix null node condition
Browse files Browse the repository at this point in the history
  • Loading branch information
yumcyaWiz committed Nov 24, 2021
1 parent 2868885 commit ee377a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/photon_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class KdTree {
requires Point<PointU>
void searchKNearestNode(int nodeIdx, const PointU& queryPoint, int k,
KNNQueue& queue) const {
if (nodeIdx >= nodes.size()) return;
if (nodeIdx == -1) return;

const Node& node = nodes[nodeIdx];

Expand Down

0 comments on commit ee377a9

Please sign in to comment.