summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pugixpath.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pugixpath.cpp b/src/pugixpath.cpp
index a2859ec..ba447dd 100644
--- a/src/pugixpath.cpp
+++ b/src/pugixpath.cpp
@@ -2500,10 +2500,13 @@ namespace pugi
{
xpath_node_set ns;
- ns.push_back(c.root);
+ if (c.root)
+ {
+ ns.push_back(c.root);
- apply_predicates(ns, 0, c);
-
+ apply_predicates(ns, 0, c);
+ }
+
return ns;
}