1
0
Fork 0

Removed delete of dangling pointer -- fixes seg fault on reset

This commit is contained in:
tony 2002-09-28 22:48:21 +00:00
parent 2eaaddc52a
commit 2c1889a8b5

View file

@ -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;
}
} }
/******************************************************************************/ /******************************************************************************/