We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21349b7 commit 086a1c2Copy full SHA for 086a1c2
Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx
@@ -274,8 +274,10 @@ VoronoiDiagram2DGenerator<TCoordinate>::ConstructDiagram()
274
buildEdges.push_back(curr);
275
EdgeInfo front = curr;
276
EdgeInfo back = curr;
277
- while (!(rawEdges[i].empty()))
+ auto maxStop = static_cast<int>(rawEdges[i].size());
278
+ while (!(rawEdges[i].empty()) && (maxStop > 0))
279
{
280
+ --maxStop;
281
curr = rawEdges[i].front();
282
rawEdges[i].pop_front();
283
unsigned char frontbnd = Pointonbnd(front[0]);
0 commit comments