Remove erroneous call to optional_node_child().
authorCarl Hetherington <cth@carlh.net>
Sun, 9 May 2021 20:07:51 +0000 (22:07 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 27 Oct 2021 13:25:42 +0000 (15:25 +0200)
Just after this we loop over all <Text> nodes, and optional_node_child
will raise an exception if there is more than one.

src/lib/text_content.cc

index 772ed31f56fe1ed3dfdda31a95f72a1291abe2af..d000f83723dea316aa4d5c63b6b1c32912cf9a28 100644 (file)
@@ -100,10 +100,6 @@ TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version)
                return c;
        }
 
-       if (!node->optional_node_child("Text")) {
-               return list<shared_ptr<TextContent> >();
-       }
-
        list<shared_ptr<TextContent> > c;
        BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Text")) {
                c.push_back (shared_ptr<TextContent> (new TextContent (parent, i, version)));