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

This commit is contained in:
Andrew Heather
2016-09-29 16:19:15 +01:00
parent 6d380dddf6
commit aa78b03011

View File

@ -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;