Don't crash when destroying a SGBinding object if the property node it

was loaded from lacks a parent.  Patch from ndim on IRC
This commit is contained in:
andy 2007-02-14 23:14:00 +00:00
parent 8663c265d8
commit 607511fd64

View File

@ -27,7 +27,8 @@ SGBinding::SGBinding(const SGPropertyNode* node, SGPropertyNode* root)
SGBinding::~SGBinding() SGBinding::~SGBinding()
{ {
_arg->getParent()->removeChild(_arg->getName(), _arg->getIndex(), false); if(_arg && _arg->getParent())
_arg->getParent()->removeChild(_arg->getName(), _arg->getIndex(), false);
} }
void void