context BUGFIX in lysc_node_clear_all_priv func
diff --git a/src/context.c b/src/context.c
index 9c4bb54..eb67125 100644
--- a/src/context.c
+++ b/src/context.c
@@ -575,11 +575,13 @@
{
LY_ARRAY_COUNT_TYPE u, v;
- if (mod->compiled) {
- /* set NULL for all ::lysc_node.priv pointers in module */
- lysc_module_dfs_full(mod, lysc_node_clear_priv_dfs_cb, NULL);
+ if (!mod->compiled) {
+ return;
}
+ /* set NULL for all ::lysc_node.priv pointers in module */
+ lysc_module_dfs_full(mod, lysc_node_clear_priv_dfs_cb, NULL);
+
/* only lys_compile_extension_instance()
* can set ::lysp_ext_instance.parsed
*/