The vtkStaticPointLocator crashes if data isn't a vtkPointSet (master and release)
As shown in this sample code on discourse, the vtkStaticPointInterpolator crashes when given data that isn't a vtkPointSet.
In the code, there is a static_cast
where it looks like a SafeDownCast
was intended:
void BuildLocator() override
{
// Place each point in a bucket
//
vtkPointSet* ps = static_cast<vtkPointSet*>(this->DataSet);
int mapped = 0;
if (ps)
{ // map points array: explicit points representation
The static_cast
results in an invalid pointer if this->DataSet
is vtkImageData.