Skip to content

AbstractArray Fix in Calculator

Jonas Lukasczyk requested to merge jones/vtk:CalculatorFix into master

Hi everyone, the vtkArrayCalculator segfaults if the input object contains non vtkDataArray array attributes (e.g., in my case I store strings on points). There is one subroutine in vtkArrayCalculator.cxx that fetches and immediately processes the input arrays via vtkFieldData::GetArray, but this method returns nullptr if the array is not a vtkDataArray; hence the segfault. In this PR I fixed the issue by changing vtkFieldData::GetArray to vtkFieldData::GetAbstractArray.

Best Jonas

Backport: release

Edited by Mathieu Westphal (Kitware)

Merge request reports