Patch from Erik Hofman:
This patch turns out to be much more reliable compared to the previous one I sent Curtis. Could you apply it for me?
This commit is contained in:
parent
cf3e79ee46
commit
8e60042052
1 changed files with 27 additions and 22 deletions
|
@ -211,8 +211,9 @@ FGElectricalSystem::~FGElectricalSystem () {
|
|||
void FGElectricalSystem::init () {
|
||||
config_props = new SGPropertyNode;
|
||||
|
||||
SGPropertyNode *path_n = fgGetNode("/sim/systems/electrical/path", true);
|
||||
SGPropertyNode *path_n = fgGetNode("/sim/systems/electrical/path");
|
||||
|
||||
if (path_n) {
|
||||
SGPath config( globals->get_fg_root() );
|
||||
config.append( path_n->getStringValue() );
|
||||
|
||||
|
@ -225,7 +226,7 @@ void FGElectricalSystem::init () {
|
|||
enabled = true;
|
||||
} else {
|
||||
SG_LOG( SG_ALL, SG_ALERT,
|
||||
"Detected an internal inconsistancy in the electrical" );
|
||||
"Detected an internal inconsistancy in the electrical");
|
||||
SG_LOG( SG_ALL, SG_ALERT,
|
||||
" system specification file. See earlier errors for" );
|
||||
SG_LOG( SG_ALL, SG_ALERT,
|
||||
|
@ -237,6 +238,10 @@ void FGElectricalSystem::init () {
|
|||
<< config.str() );
|
||||
}
|
||||
|
||||
} else
|
||||
SG_LOG( SG_ALL, SG_ALERT,
|
||||
"No electrical model specified for this model!");
|
||||
|
||||
delete config_props;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue