mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: missing nullptr check in Function1/PatchFunction1 fallback logic
This commit is contained in:
@ -107,14 +107,15 @@ Foam::Function1<Type>::New
|
|||||||
else if (!coeffs)
|
else if (!coeffs)
|
||||||
{
|
{
|
||||||
// Primitive entry. Coeffs dictionary is optional.
|
// Primitive entry. Coeffs dictionary is optional.
|
||||||
// Use keyword() - not entryName - for compatibility lookup!
|
|
||||||
|
|
||||||
coeffs =
|
const word& kw =
|
||||||
&dict.optionalSubDict
|
|
||||||
(
|
(
|
||||||
eptr->keyword() + "Coeffs",
|
eptr
|
||||||
keyType::LITERAL
|
? eptr->keyword() // Could be a compatibility lookup
|
||||||
|
: entryName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
coeffs = &dict.optionalSubDict(kw + "Coeffs", keyType::LITERAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -129,12 +129,14 @@ Foam::PatchFunction1<Type>::New
|
|||||||
// Primitive entry. Coeffs dictionary is optional.
|
// Primitive entry. Coeffs dictionary is optional.
|
||||||
// Use keyword() - not entryName - for compatibility lookup!
|
// Use keyword() - not entryName - for compatibility lookup!
|
||||||
|
|
||||||
coeffs =
|
const word& kw =
|
||||||
&dict.optionalSubDict
|
|
||||||
(
|
(
|
||||||
eptr->keyword() + "Coeffs",
|
eptr
|
||||||
keyType::LITERAL
|
? eptr->keyword() // Could be a compatibility lookup
|
||||||
|
: entryName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
coeffs = &dict.optionalSubDict(kw + "Coeffs", keyType::LITERAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user