From: Erik Hofman Date: Tue, 27 Jul 2010 12:51:44 +0000 (+0200) Subject: Small bugfix, the previous test always sets _property (these days) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d1897fabf09129bcc3f7ee2d9ea2e002fd3b528c;p=simgear.git Small bugfix, the previous test always sets _property (these days) --- diff --git a/simgear/sound/xmlsound.cxx b/simgear/sound/xmlsound.cxx index 479e3123..2a3cbfac 100644 --- a/simgear/sound/xmlsound.cxx +++ b/simgear/sound/xmlsound.cxx @@ -109,7 +109,10 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node, if ( !strcmp(type_str, "avionics") ) is_avionics = true; - _property = root->getNode(node->getStringValue("property", ""), true); + string propval = node->getStringValue("property", ""); + if (propval != "") + _property = root->getNode(propval, true); + SGPropertyNode *condition = node->getChild("condition"); if (condition != NULL) _condition = sgReadCondition(root, condition);