diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C b/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C index 28ec2c91d58a2e5e885dce0a7b97654799494f9f..db5f1619e7849a4b636f9c6b4e3b97b95e1ea7dc 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C +++ b/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C @@ -89,20 +89,23 @@ addGeometryToScene return; } - const dictionary dict = - geometryBase::parent_.getObjectProperty - ( - functionObject_, - fieldName_, - dictionary::null - ); + dictionary dict; + if (!geometryBase::parent_.getObjectDict(functionObject_, fieldName_, dict)) + { + WarningInFunction + << "Unable to find function object " << functionObject_ + << " output for field " << fieldName_ + << ". Line will not be processed" + << endl; + return; + } fileName fName; if (!dict.readIfPresent("file", fName)) { WarningInFunction - << "Unable to find function object " << functionObject_ - << " output for field " << fieldName_ + << "Unable to read file name from function object " + << functionObject_ << " for field " << fieldName_ << ". Line will not be processed" << endl; return; diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C b/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C index b7b11e69456567002377354f34adb6c01ec11440..cfa91bf2487fa5480a3fee8645b5020304c6249f 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C +++ b/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C @@ -93,21 +93,24 @@ addGeometryToScene return; } - const dictionary dict = - geometryBase::parent_.getObjectProperty - ( - functionObject_, - fieldName_, - dictionary::null - ); + dictionary dict; + if (!geometryBase::parent_.getObjectDict(functionObject_, fieldName_, dict)) + { + WarningInFunction + << "Unable to find function object " << functionObject_ + << " output for field " << fieldName_ + << ". Surface will not be processed" + << endl; + return; + } fileName fName; if (!dict.readIfPresent("file", fName)) { WarningInFunction - << "Unable to find function object " << functionObject_ - << " output for field " << fieldName_ - << ". functionObjectSurface will not be processed" + << "Unable to read file name from function object " + << functionObject_ << " for field " << fieldName_ + << ". Surface will not be processed" << endl; return; }