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)
|
||||
{
|
||||
// Primitive entry. Coeffs dictionary is optional.
|
||||
// Use keyword() - not entryName - for compatibility lookup!
|
||||
|
||||
coeffs =
|
||||
&dict.optionalSubDict
|
||||
(
|
||||
eptr->keyword() + "Coeffs",
|
||||
keyType::LITERAL
|
||||
);
|
||||
const word& kw =
|
||||
(
|
||||
eptr
|
||||
? eptr->keyword() // Could be a compatibility lookup
|
||||
: entryName
|
||||
);
|
||||
|
||||
coeffs = &dict.optionalSubDict(kw + "Coeffs", keyType::LITERAL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user