]> git.mxchange.org Git - flightgear.git/commitdiff
Skip all empty bindings
authorehofman <ehofman>
Wed, 4 Jun 2003 09:50:00 +0000 (09:50 +0000)
committerehofman <ehofman>
Wed, 4 Jun 2003 09:50:00 +0000 (09:50 +0000)
src/Input/input.cxx

index 95b141a633d3a05404d5d2427a110e10b4cbe125..e7377067cc03d8d5ed6cc9b5a6ee9d09944d9718 100644 (file)
@@ -805,9 +805,11 @@ FGInput::_read_bindings (const SGPropertyNode * node,
   SG_LOG(SG_INPUT, SG_DEBUG, "Reading all bindings");
   vector<SGPropertyNode_ptr> bindings = node->getChildren("binding");
   for (unsigned int i = 0; i < bindings.size(); i++) {
-    SG_LOG(SG_INPUT, SG_DEBUG, "Reading binding "
-           << bindings[i]->getStringValue("command"));
-    binding_list[modifiers].push_back(new FGBinding(bindings[i]));
+    if (bindings[i]->nChildren() > 0) {
+      SG_LOG(SG_INPUT, SG_DEBUG, "Reading binding "
+             << bindings[i]->getStringValue("command"));
+      binding_list[modifiers].push_back(new FGBinding(bindings[i]));
+    }
   }
 
                                 // Read nested bindings for modifiers