]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/SGBinding.cxx
Make use of posix clocks if available.
[simgear.git] / simgear / structure / SGBinding.cxx
index acd91814c50ebec4cefcbf64b966f2bb51ddd194..e65b4d2a8bf584a3928f9f06bd1605e7b1f8e17b 100644 (file)
@@ -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
@@ -41,7 +42,6 @@ SGBinding::read(const SGPropertyNode* node, SGPropertyNode* root)
   if (_command_name.empty()) {
     SG_LOG(SG_INPUT, SG_WARN, "No command supplied for binding.");
     _command = 0;
-    return;
   }
 
   _arg = const_cast<SGPropertyNode*>(node);