Skip to content

Commit

Permalink
xpath BUGFIX opaque node handling
Browse files Browse the repository at this point in the history
Fixes #2199
  • Loading branch information
michalvasko committed Mar 8, 2024
1 parent 381d978 commit 2b0e8a2
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 @@ -8005,7 +8005,7 @@ eval_name_test_with_predicate_get_scnode(const struct ly_ctx *ctx, const struct
/* search in top-level */
scnode = lys_find_child(NULL, moveto_mod, name, name_len, 0, 0);
}
} else if (!*found || (lysc_data_parent(*found) != node->schema)) {
} else if (node->schema && (!*found || (lysc_data_parent(*found) != node->schema))) {
if ((format == LY_VALUE_JSON) && !moveto_mod) {
/* we must adjust the module to inherit the one from the context node */
moveto_mod = node->schema->module;
Expand Down

0 comments on commit 2b0e8a2

Please sign in to comment.