Skip to content
Snippets Groups Projects
Commit 8cd1e423 authored by Ken Martin's avatar Ken Martin
Browse files

fix a fpe on zero length Lines

Simple fix to avoid divide by zero
parent 3cf63a50
No related branches found
No related tags found
No related merge requests found
......@@ -250,9 +250,12 @@ int vtkLineSource::RequestData(vtkInformation* vtkNotUsed(request),
}
// now normalize the tcoord
for (vtkIdType cc = 1; cc < numPts; ++cc)
if (length_sum)
{
newTCoords->SetTypedComponent(cc, 0, newTCoords->GetTypedComponent(cc, 0) / length_sum);
for (vtkIdType cc = 1; cc < numPts; ++cc)
{
newTCoords->SetTypedComponent(cc, 0, newTCoords->GetTypedComponent(cc, 0) / length_sum);
}
}
// Update ourselves and release memory
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment