Small bugfix, the previous test always sets _property (these days)

This commit is contained in:
Erik Hofman
2010-07-27 14:51:44 +02:00
parent d4178d6440
commit d1897fabf0

View File

@@ -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);