From 2c1889a8b5c355fc90e922be4929a5a843fba88c Mon Sep 17 00:00:00 2001 From: tony Date: Sat, 28 Sep 2002 22:48:21 +0000 Subject: [PATCH] Removed delete of dangling pointer -- fixes seg fault on reset --- src/FDM/JSBSim/JSBSim.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index 1fbc7b054..0e152a82c 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -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; } /******************************************************************************/