diff --git a/simgear/structure/SGBinding.cxx b/simgear/structure/SGBinding.cxx index acd91814..0c3f7feb 100644 --- a/simgear/structure/SGBinding.cxx +++ b/simgear/structure/SGBinding.cxx @@ -27,7 +27,8 @@ SGBinding::SGBinding(const SGPropertyNode* node, SGPropertyNode* root) SGBinding::~SGBinding() { - _arg->getParent()->removeChild(_arg->getName(), _arg->getIndex(), false); + if(_arg && _arg->getParent()) + _arg->getParent()->removeChild(_arg->getName(), _arg->getIndex(), false); } void