mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Avoid segfault if a '#directive' is used in the global controlDict
This commit is contained in:
@ -63,6 +63,17 @@ bool Foam::functionEntry::insert
|
|||||||
"primitiveEntry& entry, Istream& is)"
|
"primitiveEntry& entry, Istream& is)"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!insertprimitiveEntryIstreamMemberFunctionTablePtr_)
|
||||||
|
{
|
||||||
|
cerr<<"functionEntry::insert"
|
||||||
|
<< "(const word&, dictionary&, primitiveEntry&, Istream&)"
|
||||||
|
<< " not yet initialized, function = "
|
||||||
|
<< functionName.c_str() << std::endl;
|
||||||
|
|
||||||
|
// return true to keep reading anyhow
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
insertprimitiveEntryIstreamMemberFunctionTable::iterator mfIter =
|
insertprimitiveEntryIstreamMemberFunctionTable::iterator mfIter =
|
||||||
insertprimitiveEntryIstreamMemberFunctionTablePtr_->find(functionName);
|
insertprimitiveEntryIstreamMemberFunctionTablePtr_->find(functionName);
|
||||||
|
|
||||||
@ -97,6 +108,17 @@ bool Foam::functionEntry::insert
|
|||||||
"(const word& functionName, dictionary& parentDict, Istream& is)"
|
"(const word& functionName, dictionary& parentDict, Istream& is)"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!insertdictionaryIstreamMemberFunctionTablePtr_)
|
||||||
|
{
|
||||||
|
cerr<<"functionEntry::insert"
|
||||||
|
<< "(const word&, dictionary&, Istream&)"
|
||||||
|
<< " not yet initialized, function = "
|
||||||
|
<< functionName.c_str() << std::endl;
|
||||||
|
|
||||||
|
// Return true to keep reading
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
insertdictionaryIstreamMemberFunctionTable::iterator mfIter =
|
insertdictionaryIstreamMemberFunctionTable::iterator mfIter =
|
||||||
insertdictionaryIstreamMemberFunctionTablePtr_->find(functionName);
|
insertdictionaryIstreamMemberFunctionTablePtr_->find(functionName);
|
||||||
|
|
||||||
|
|||||||
@ -31,12 +31,19 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::word Foam::functionEntries::includeEntry::typeName
|
||||||
|
(
|
||||||
|
Foam::functionEntries::includeEntry::typeName_()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Don't lookup the debug switch here as the debug switch dictionary
|
||||||
|
// might include includeEntry
|
||||||
|
int Foam::functionEntries::includeEntry::debug(0);
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace functionEntries
|
namespace functionEntries
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(includeEntry, 0);
|
|
||||||
|
|
||||||
addToMemberFunctionSelectionTable
|
addToMemberFunctionSelectionTable
|
||||||
(
|
(
|
||||||
functionEntry,
|
functionEntry,
|
||||||
|
|||||||
@ -30,12 +30,19 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::word Foam::functionEntries::inputModeEntry::typeName
|
||||||
|
(
|
||||||
|
Foam::functionEntries::inputModeEntry::typeName_()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Don't lookup the debug switch here as the debug switch dictionary
|
||||||
|
// might include inputModeEntries
|
||||||
|
int Foam::functionEntries::inputModeEntry::debug(0);
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace functionEntries
|
namespace functionEntries
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(inputModeEntry, 0);
|
|
||||||
|
|
||||||
addToMemberFunctionSelectionTable
|
addToMemberFunctionSelectionTable
|
||||||
(
|
(
|
||||||
functionEntry,
|
functionEntry,
|
||||||
|
|||||||
Reference in New Issue
Block a user