Commit 35ec2d82 authored by Yohann Bearzi's avatar Yohann Bearzi Committed by Kitware Robot
Browse files

Merge topic 'vtkPointLocator-fix'

f14c87ef

 Fix vtkPointLocator::FindClosestInsertedPoint when no points are present
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Cory Quammen's avatarCory Quammen <cory.quammen@kitware.com>
Merge-request: !8041
parents d34de518 f14c87ef
...@@ -1346,7 +1346,7 @@ vtkIdType vtkPointLocator::FindClosestInsertedPoint(const double x[3]) ...@@ -1346,7 +1346,7 @@ vtkIdType vtkPointLocator::FindClosestInsertedPoint(const double x[3])
// points in this bucket, search 1st level neighbors, and so on, // points in this bucket, search 1st level neighbors, and so on,
// until closest point found. // until closest point found.
// //
for (closest = 0, minDist2 = VTK_DOUBLE_MAX, level = 0; (closest == 0) && for (closest = -1, minDist2 = VTK_DOUBLE_MAX, level = 0; (closest == -1) &&
(level < this->Divisions[0] || level < this->Divisions[1] || level < this->Divisions[2]); (level < this->Divisions[0] || level < this->Divisions[1] || level < this->Divisions[2]);
level++) level++)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment