Commit da522f73 authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot
Browse files

Merge topic '17941-3dlineargridplanecutter-fix' into paraview/release

cc639330

 vtk3DLinearGridPlaneCutter: protect against null points/cells

Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Will Schroeder's avatarWill Schroeder <will.schroeder@kitware.com>
Merge-request: !7082
parents 55d89dde cc639330
......@@ -852,14 +852,20 @@ int vtk3DLinearGridPlaneCutter::ProcessPiece(
vtkUnstructuredGrid* input, vtkPlane* plane, vtkPolyData* output)
{
// Make sure there is input data to process
if (!input || !plane || !output)
{
vtkLog(INFO, "Null input, plane, or output");
return 1;
}
vtkPoints* inPts = input->GetPoints();
vtkIdType numPts = inPts->GetNumberOfPoints();
vtkIdType numPts = inPts ? inPts->GetNumberOfPoints() : 0;
vtkCellArray* cells = input->GetCells();
vtkIdType numCells = cells->GetNumberOfCells();
vtkIdType numCells = cells ? cells->GetNumberOfCells() : 0;
if (numPts <= 0 || numCells <= 0)
{
vtkLog(INFO, "Empty input");
return 0;
return 1;
}
// Check the input point type. Only real types are supported.
......
Supports Markdown
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