summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index ed878de..f52d236 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -11333,12 +11333,12 @@ PUGI__NS_BEGIN
{
_lexer.next();
- xpath_ast_node* expr = parse_expression();
- if (!expr) return 0;
-
if (n->rettype() != xpath_type_node_set)
return error("Predicate has to be applied to node set");
+ xpath_ast_node* expr = parse_expression();
+ if (!expr) return 0;
+
n = alloc_node(ast_filter, n, expr, predicate_default);
if (!n) return 0;