diff BUGFIX skip opaque nodes
diff --git a/src/diff.c b/src/diff.c
index 4971c6f..bfc583a 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -625,6 +625,10 @@
/* compare first tree to the second tree - delete, replace, none */
LY_LIST_FOR(first, iter_first) {
+ if (!iter_first->schema) {
+ continue;
+ }
+
assert(!(iter_first->schema->flags & LYS_KEY));
if ((iter_first->flags & LYD_DEFAULT) && !(options & LYD_DIFF_DEFAULTS)) {
/* skip default nodes */
@@ -694,6 +698,10 @@
/* compare second tree to the first tree - create, user-ordered move */
LY_LIST_FOR(second, iter_second) {
+ if (!iter_second->schema) {
+ continue;
+ }
+
assert(!(iter_second->schema->flags & LYS_KEY));
if ((iter_second->flags & LYD_DEFAULT) && !(options & LYD_DIFF_DEFAULTS)) {
/* skip default nodes */