diff options
Diffstat (limited to 'src/cxml.cc')
| -rw-r--r-- | src/cxml.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cxml.cc b/src/cxml.cc index e4435a2..c2d8534 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -98,6 +98,10 @@ cxml::Node::node_children (string name) const how get_path works. */ + if (!_node) { + throw cxml::Error("Node has no internal xmlpp node; did you forget to call a read method on cxml::Document?"); + } + vector<shared_ptr<cxml::Node>> n; for (auto i: _node->get_children()) { if (i->get_name() == name) { |
