From 2cfc88fa03d524b1048e0450a2bad986179769a9 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 12 Sep 2017 15:42:10 +0200 Subject: [PATCH] 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. --- .../graphics/PVReaders/vtkPVFoam/vtkPVFoam.H | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.H b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.H index 55ec9d73e1..226ff6b9bd 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.H +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.H @@ -155,7 +155,10 @@ class vtkPVFoam vtkSmartPointer getCopy() const { auto copy = vtkSmartPointer::New(); - copy->ShallowCopy(vtkgeom); + if (vtkgeom) + { + copy->ShallowCopy(vtkgeom); + } return copy; } @@ -163,7 +166,10 @@ class vtkPVFoam void reuse() { dataset = vtkSmartPointer::New(); - dataset->ShallowCopy(vtkgeom); + if (vtkgeom) + { + dataset->ShallowCopy(vtkgeom); + } } //- Set the geometry and make a shallow copy to dataset