aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Luis Marti <joseluis.marti@gmail.com>2022-12-09 02:06:04 +0100
committerJose Luis Marti <joseluis.marti@gmail.com>2022-12-09 02:06:04 +0100
commit91a2a0e2f7b84dafb5ff3f763e136183f2a69e5a (patch)
tree279962178852ec5ea670516c8b1ff70ebfe5a438
parent7cc3d3cb9555848c59a325e6113b3de5ddb209ea (diff)
[GUI] PARAM in includes are not evaluated when comments exist
-rw-r--r--xbmc/guilib/GUIIncludes.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/xbmc/guilib/GUIIncludes.cpp b/xbmc/guilib/GUIIncludes.cpp
index ee17330004..c389122d89 100644
--- a/xbmc/guilib/GUIIncludes.cpp
+++ b/xbmc/guilib/GUIIncludes.cpp
@@ -618,12 +618,16 @@ void CGUIIncludes::ResolveParametersForNode(TiXmlElement *node, const Params& pa
else if (result != NO_PARAMS_FOUND)
child->SetValue(newValue);
}
- else if (child->Type() == TiXmlNode::TINYXML_ELEMENT)
+ else if (child->Type() == TiXmlNode::TINYXML_ELEMENT ||
+ child->Type() == TiXmlNode::TINYXML_COMMENT)
{
do
{
- TiXmlElement *next = child->NextSiblingElement(); // save next as current child might be removed from the tree
- ResolveParametersForNode(static_cast<TiXmlElement *>(child), params);
+ if (child->Type() == TiXmlNode::TINYXML_ELEMENT)
+ ResolveParametersForNode(static_cast<TiXmlElement*>(child), params);
+
+ // save next as current child might be removed from the tree
+ TiXmlElement* next = child->NextSiblingElement();
child = next;
}
while (child);