-
Notifications
You must be signed in to change notification settings - Fork 0
/
pstreamtracer.patch
29 lines (26 loc) · 1.09 KB
/
pstreamtracer.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/VTK/Filters/ParallelFlowPaths/vtkPStreamTracer.cxx b/VTK/Filters/ParallelFlowPaths/vtkPStreamTracer.cxx
index 7b11f1f..01fa72d 100644
--- a/VTK/Filters/ParallelFlowPaths/vtkPStreamTracer.cxx
+++ b/VTK/Filters/ParallelFlowPaths/vtkPStreamTracer.cxx
@@ -1795,9 +1795,8 @@ void vtkPStreamTracer::Trace( vtkDataSet *input,
PRINT( "Fix Single Point Path")
AssertEq(traceOut->GetNumberOfPoints(),1); //fix it
vtkNew<vtkCellArray> newCells;
- vtkIdType cell;
- cell = 0;
- newCells->InsertNextCell(1,&cell);
+ vtkIdType cells[2] = {0, 0};
+ newCells->InsertNextCell(2,cells);
traceOut->SetLines(newCells);
// Don't forget to add the ReasonForTermination cell array.
@@ -1897,7 +1896,10 @@ void vtkPStreamTracer::Prepend(vtkPolyData* pathPoly, vtkPolyData* headPoly)
}
pathCells->Reset();
- pathCells->InsertNextCell(newPath);
+ if (newPath->GetNumberOfIds() > 1)
+ {
+ pathCells->InsertNextCell(newPath);
+ }
AssertEq(pathCells->GetNumberOfCells(),1);
vtkIdType newNumPoints(0);
pathCells->GetNextCell(newNumPoints,path);