mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -155,7 +155,10 @@ class vtkPVFoam
|
||||
vtkSmartPointer<dataType> getCopy() const
|
||||
{
|
||||
auto copy = vtkSmartPointer<dataType>::New();
|
||||
copy->ShallowCopy(vtkgeom);
|
||||
if (vtkgeom)
|
||||
{
|
||||
copy->ShallowCopy(vtkgeom);
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
@ -163,7 +166,10 @@ class vtkPVFoam
|
||||
void reuse()
|
||||
{
|
||||
dataset = vtkSmartPointer<dataType>::New();
|
||||
dataset->ShallowCopy(vtkgeom);
|
||||
if (vtkgeom)
|
||||
{
|
||||
dataset->ShallowCopy(vtkgeom);
|
||||
}
|
||||
}
|
||||
|
||||
//- Set the geometry and make a shallow copy to dataset
|
||||
|
||||
Reference in New Issue
Block a user