Skip to content
Snippets Groups Projects
Commit 941e1778 authored by mattijs's avatar mattijs
Browse files

BUG: timeVaryingMappedFixedValueFvPatchField: clone only if existing

parent fc0120f9
Branches
No related merge requests found
......@@ -79,7 +79,12 @@ timeVaryingMappedFixedValueFvPatchField
endSampleTime_(-1),
endSampledValues_(0),
endAverage_(pTraits<Type>::zero),
offset_(ptf.offset_().clone().ptr())
offset_
(
ptf.offset_.valid()
? ptf.offset_().clone().ptr()
: NULL
)
{}
......@@ -138,7 +143,12 @@ timeVaryingMappedFixedValueFvPatchField
endSampleTime_(ptf.endSampleTime_),
endSampledValues_(ptf.endSampledValues_),
endAverage_(ptf.endAverage_),
offset_(ptf.offset_().clone().ptr())
offset_
(
ptf.offset_.valid()
? ptf.offset_().clone().ptr()
: NULL
)
{}
......@@ -163,7 +173,12 @@ timeVaryingMappedFixedValueFvPatchField
endSampleTime_(ptf.endSampleTime_),
endSampledValues_(ptf.endSampledValues_),
endAverage_(ptf.endAverage_),
offset_(ptf.offset_().clone().ptr())
offset_
(
ptf.offset_.valid()
? ptf.offset_().clone().ptr()
: NULL
)
{}
......
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