mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: invalid pointer reference for optional coordinate system lookup
- code remnant from separate lookup + construct of coordinateSystem
(7b2bcfda0b).
Apply consistent use of coordinateSystem::NewIfPresent to avoid
these types of coding mishaps
This commit is contained in:
@ -84,14 +84,12 @@ void Foam::geomDecomp::readCoeffs()
|
||||
}
|
||||
setOrder();
|
||||
|
||||
// Optional cartesian coordinate system transform
|
||||
const dictionary* dictptr =
|
||||
coeffsDict_.findDict("transform", keyType::LITERAL);
|
||||
// Optional (cartesian) coordinate system transform
|
||||
auto csysPtr = coordinateSystem::NewIfPresent(coeffsDict_, "transform");
|
||||
|
||||
if (dictptr)
|
||||
if (csysPtr)
|
||||
{
|
||||
// 'origin' (READ_IF_PRESENT)
|
||||
csys_ = coordinateSystem(*dictptr, IOobjectOption::READ_IF_PRESENT);
|
||||
csys_ = csysPtr();
|
||||
}
|
||||
else if (equal(delta_, 0))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user