Removed delete of dangling pointer -- fixes seg fault on reset
This commit is contained in:
parent
2eaaddc52a
commit
2c1889a8b5
1 changed files with 3 additions and 5 deletions
|
@ -72,7 +72,8 @@ FGJSBsim::FGJSBsim( double dt )
|
|||
{
|
||||
bool result;
|
||||
|
||||
fdmex = new FGFDMExec( (FGPropertyManager*)globals->get_props() );
|
||||
//fdmex = new FGFDMExec( (FGPropertyManager*)globals->get_props() );
|
||||
fdmex = new FGFDMExec();
|
||||
|
||||
State = fdmex->GetState();
|
||||
Atmosphere = fdmex->GetAtmosphere();
|
||||
|
@ -184,10 +185,7 @@ FGJSBsim::FGJSBsim( double dt )
|
|||
}
|
||||
/******************************************************************************/
|
||||
FGJSBsim::~FGJSBsim(void) {
|
||||
if (fdmex != NULL) {
|
||||
delete fdmex; fdmex=NULL;
|
||||
delete fgic; fgic=NULL;
|
||||
}
|
||||
delete fdmex;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
Loading…
Reference in a new issue