Commit aa78b030 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: functionObjects - do not add to list if error on read

parent 6d380ddd
......@@ -701,12 +701,14 @@ bool Foam::functionObjectList::read()
"functionObject::" + objPtr->name() + "::read"
);
ok = objPtr->read(dict) && ok;
enabled = objPtr->read(dict);
ok = enabled && ok;
}
}
else
if (!enabled)
{
// Delete the disabled functionObject
// Delete the disabled/invalid(read) functionObject
delete objPtr;
objPtr = nullptr;
continue;
......
Supports Markdown
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