diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 5bd2d0681..dd49874a6 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -93,6 +93,11 @@ FGBinding::FGBinding (const SGPropertyNode * node) read(node); } +FGBinding::~FGBinding () +{ + _arg->getParent()->removeChild(_arg->getName(), _arg->getIndex()); +} + void FGBinding::read (const SGPropertyNode * node) { @@ -107,9 +112,8 @@ FGBinding::read (const SGPropertyNode * node) return; } - _arg = new SGPropertyNode; + _arg = (SGPropertyNode *)node; _setting = 0; - copyProperties(node, _arg); // FIXME: don't use whole node!!! } void diff --git a/src/Input/input.hxx b/src/Input/input.hxx index 5a41a57a4..72d0b0c97 100644 --- a/src/Input/input.hxx +++ b/src/Input/input.hxx @@ -95,7 +95,7 @@ public: /** * Destructor. */ - virtual ~FGBinding () {} + virtual ~FGBinding (); /**