vtkPolyData::GetCellPoints may corrupt vtkIdList
The overload which writes cell points into a vtkIdList contains this code:
this->vtkPolyData::GetCellPoints(cellId, npts, pts); ptIds->InsertId (npts-1,pts[npts-1]); for (i=0; i<npts-1; i++) { ptIds->SetId(i,pts[i]); }
When the vtkPolyData
contains a cell without points (which obviously is an error in itself), this method will corrupt ptIds
because it unconditionally writes
ptIds->InsertId (npts-1,pts[npts-1]);