Skip to content

Commit

Permalink
tree data BUGFIX handling opaque nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Aug 7, 2023
1 parent 8fafbb6 commit 3931115
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tree_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -2613,7 +2613,7 @@ lyd_find_sibling_first(const struct lyd_node *siblings, const struct lyd_node *t
siblings = lyd_first_sibling(siblings);

parent = siblings->parent;
if (parent && parent->schema && parent->children_ht) {
if (target->schema && parent && parent->schema && parent->children_ht) {
assert(target->hash);

if (lysc_is_dup_inst_list(target->schema)) {
Expand All @@ -2640,7 +2640,7 @@ lyd_find_sibling_first(const struct lyd_node *siblings, const struct lyd_node *t
}
}
} else {
/* no children hash table */
/* no children hash table or cannot be used */
for ( ; siblings; siblings = siblings->next) {
if (lysc_is_dup_inst_list(target->schema)) {
if (!lyd_compare_single(siblings, target, LYD_COMPARE_FULL_RECURSION)) {
Expand Down

0 comments on commit 3931115

Please sign in to comment.