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.
This commit is contained in:
Mark Olesen
2017-09-12 15:42:10 +02:00
parent 05aa701c15
commit 2cfc88fa03

View File

@ -155,7 +155,10 @@ class vtkPVFoam
vtkSmartPointer<dataType> getCopy() const
{
auto copy = vtkSmartPointer<dataType>::New();
if (vtkgeom)
{
copy->ShallowCopy(vtkgeom);
}
return copy;
}
@ -163,8 +166,11 @@ class vtkPVFoam
void reuse()
{
dataset = vtkSmartPointer<dataType>::New();
if (vtkgeom)
{
dataset->ShallowCopy(vtkgeom);
}
}
//- Set the geometry and make a shallow copy to dataset
void set(vtkSmartPointer<dataType> geom)