Skip to content

Commit 2b0e8a2

Browse files
committed
xpath BUGFIX opaque node handling
Fixes #2199
1 parent 381d978 commit 2b0e8a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/xpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8005,7 +8005,7 @@ eval_name_test_with_predicate_get_scnode(const struct ly_ctx *ctx, const struct
80058005
/* search in top-level */
80068006
scnode = lys_find_child(NULL, moveto_mod, name, name_len, 0, 0);
80078007
}
8008-
} else if (!*found || (lysc_data_parent(*found) != node->schema)) {
8008+
} else if (node->schema && (!*found || (lysc_data_parent(*found) != node->schema))) {
80098009
if ((format == LY_VALUE_JSON) && !moveto_mod) {
80108010
/* we must adjust the module to inherit the one from the context node */
80118011
moveto_mod = node->schema->module;

0 commit comments

Comments
 (0)