Skip to content

Commit

Permalink
xpath BUGFIX opaque node handling
Browse files Browse the repository at this point in the history
Fixes #2144
  • Loading branch information
michalvasko committed Dec 14, 2023
1 parent 6034142 commit 1ef66d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ get_node_pos(const struct lyd_node *node, enum lyxp_node_type node_type, const s
LYD_TREE_DFS_continue = 0;
}

if ((root_type == LYXP_NODE_ROOT_CONFIG) && (elem->schema->flags & LYS_CONFIG_R)) {
if ((root_type == LYXP_NODE_ROOT_CONFIG) && elem->schema && (elem->schema->flags & LYS_CONFIG_R)) {
/* skip */
LYD_TREE_DFS_continue = 1;
} else {
Expand Down

0 comments on commit 1ef66d4

Please sign in to comment.