Skip to content
Snippets Groups Projects
Verified Commit a96d29eb authored by Vincent Le Garrec's avatar Vincent Le Garrec
Browse files

Don't crash if no TransferFunction is set

parent 2775806c
No related branches found
No related tags found
No related merge requests found
......@@ -396,6 +396,12 @@ double vtkPlotHistogram2D::GetInputArrayValue(int x, int y, int z)
return std::nan("");
}
if (!this->TransferFunction)
{
vtkErrorMacro("Trying to get value while no transfer function was set.");
return std::nan("");
}
int vectorMode = this->TransferFunction->GetVectorMode();
if (vtkPlotHistogram2D::CanComputeMagnitude(selectedArray) &&
vectorMode == vtkScalarsToColors::VectorModes::MAGNITUDE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment