mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Fix XML-writer edge-case (empty content)
This commit is contained in:
parent
eca27d8218
commit
7852047dca
1 changed files with 6 additions and 0 deletions
|
|
@ -482,6 +482,12 @@ XMLNode::attribute_value()
|
|||
XMLNode*
|
||||
XMLNode::add_content(const string& c)
|
||||
{
|
||||
if (c.empty ()) {
|
||||
/* this would add a "</>" child, leading to invalid XML.
|
||||
* Also in XML, empty string content is equivalent to no content.
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
return add_child_copy(XMLNode (string(), c));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue