From: ehofman Date: Wed, 4 Jun 2003 09:50:00 +0000 (+0000) Subject: Skip all empty bindings X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=15c54b57f9c8edbbb9f91eeba0516b2d6f27e149;p=flightgear.git Skip all empty bindings --- 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