Skip to content
Snippets Groups Projects
Commit 24a6504c authored by David C. Lonie's avatar David C. Lonie
Browse files

Validate pointer before dereferencing.

parent fadaa35e
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,11 @@ bool Convert(const vtkm::cont::DataSet& voutput, vtkUnstructuredGrid* output,
vtkDataSet* input)
{
vtkPoints* points = fromvtkm::Convert(voutput.GetCoordinateSystem());
// If this fails, it's likely a missing entry in tovtkm::PointListOutVTK:
if (!points)
{
return false;
}
output->SetPoints(points);
points->FastDelete();
......
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