diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 0ba1af5bea..3d23cce5c3 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -146,6 +146,14 @@ int main(int argc, char *argv[]) Info<< "Converting faces on zone " << zoneID.name() << " into baffles." << nl << endl; + if (zoneID.index() == -1) + { + FatalErrorIn(args.executable()) << "Cannot find faceZone " + << zoneID.name() << endl + << "Valid zones are " << faceZones.names() + << exit(FatalError); + } + const faceZone& fZone = faceZones[zoneID.index()]; Info<< "Found " << returnReduce(fZone.size(), sumOp