Commit f28cbed9 authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: paraview reader attempts to shallow copy nullptr (closes #586)

- Can occur if the selected geometry does not actually exist.
  A non-critical bug since paraview catches this anyhow and
  just emits a warning message.
parent 849df8d0
...@@ -155,7 +155,10 @@ class vtkPVFoam ...@@ -155,7 +155,10 @@ class vtkPVFoam
vtkSmartPointer<dataType> getCopy() const vtkSmartPointer<dataType> getCopy() const
{ {
auto copy = vtkSmartPointer<dataType>::New(); auto copy = vtkSmartPointer<dataType>::New();
copy->ShallowCopy(vtkgeom); if (vtkgeom)
{
copy->ShallowCopy(vtkgeom);
}
return copy; return copy;
} }
...@@ -163,7 +166,10 @@ class vtkPVFoam ...@@ -163,7 +166,10 @@ class vtkPVFoam
void reuse() void reuse()
{ {
dataset = vtkSmartPointer<dataType>::New(); dataset = vtkSmartPointer<dataType>::New();
dataset->ShallowCopy(vtkgeom); if (vtkgeom)
{
dataset->ShallowCopy(vtkgeom);
}
} }
//- Set the geometry and make a shallow copy to dataset //- Set the geometry and make a shallow copy to dataset
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment