avoid crashing if vn<100
This commit is contained in:
parent
79f2fc9e73
commit
77bbf1d70c
|
@ -62,7 +62,7 @@ public:
|
|||
// tree.setMaxNofNeighbors(nn);
|
||||
const ScalarType maxDistSquared = maxDist*maxDist;
|
||||
int cnt=0;
|
||||
int step=m.vn/100;
|
||||
int step = max(m.vn, int(m.vn / 100));
|
||||
typename KdTree<ScalarType>::PriorityQueue nq;
|
||||
for (VertexIterator vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue