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;
|
bool result;
|
||||||
|
|
||||||
fdmex = new FGFDMExec( (FGPropertyManager*)globals->get_props() );
|
//fdmex = new FGFDMExec( (FGPropertyManager*)globals->get_props() );
|
||||||
|
fdmex = new FGFDMExec();
|
||||||
|
|
||||||
State = fdmex->GetState();
|
State = fdmex->GetState();
|
||||||
Atmosphere = fdmex->GetAtmosphere();
|
Atmosphere = fdmex->GetAtmosphere();
|
||||||
|
@ -184,10 +185,7 @@ FGJSBsim::FGJSBsim( double dt )
|
||||||
}
|
}
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
FGJSBsim::~FGJSBsim(void) {
|
FGJSBsim::~FGJSBsim(void) {
|
||||||
if (fdmex != NULL) {
|
delete fdmex;
|
||||||
delete fdmex; fdmex=NULL;
|
|
||||||
delete fgic; fgic=NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
Loading…
Add table
Reference in a new issue