diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index c2c8309b45..bb0d7c2ce5 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -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;