From 15c54b57f9c8edbbb9f91eeba0516b2d6f27e149 Mon Sep 17 00:00:00 2001 From: ehofman Date: Wed, 4 Jun 2003 09:50:00 +0000 Subject: [PATCH] Skip all empty bindings --- src/Input/input.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 95b141a63..e7377067c 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -805,9 +805,11 @@ FGInput::_read_bindings (const SGPropertyNode * node, SG_LOG(SG_INPUT, SG_DEBUG, "Reading all bindings"); vector 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 -- 2.39.5