parser UPDATE guess opaque node schema nodes
... for their descendant parsing purposes.
Refs #2086
diff --git a/src/tree_data.c b/src/tree_data.c
index a5a0201..463daac 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -697,7 +697,7 @@
lyd_insert_hash(node);
/* finish hashes for our parent, if needed and possible */
- if (node->schema && (node->schema->flags & LYS_KEY) && parent && lyd_insert_has_keys(parent)) {
+ if (node->schema && (node->schema->flags & LYS_KEY) && parent && parent->schema && lyd_insert_has_keys(parent)) {
lyd_hash(parent);
/* now we can insert even the list into its parent HT */