diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-13 00:10:19 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-13 00:10:19 +0100 |
| commit | 830d8e01713add5856f44a5246eb65781458d0b8 (patch) | |
| tree | 736702d96029223cd3403f58bbbd9286dc5680c8 /src/xml.cc | |
| parent | a1a33941351365cc371f468c6c9c8f0cf8ca32d2 (diff) | |
Tweaks for more real-life DCPs; beginning of subtitle support.
Diffstat (limited to 'src/xml.cc')
| -rw-r--r-- | src/xml.cc | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -62,9 +62,14 @@ XMLNode::string_node (string name) xmlpp::Node* node = xml_node (name); xmlpp::Node::NodeList c = node->get_children (); - if (c.size() != 1) { + + if (c.size() > 1) { throw XMLError ("unexpected content in XML node"); } + + if (c.empty ()) { + return ""; + } xmlpp::ContentNode const * v = dynamic_cast<xmlpp::ContentNode const *> (c.front()); if (!v) { |
