summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pugixml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index c2b26f0..f21ab7f 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -5562,7 +5562,7 @@ namespace pugi
{
}
- xpath_node::xpath_node(const xml_attribute& attribute, const xml_node& parent): _node(parent), _attribute(attribute)
+ xpath_node::xpath_node(const xml_attribute& attribute, const xml_node& parent): _node(attribute ? parent : xml_node()), _attribute(attribute)
{
}