nacm BUGFIX handle extensions without plugins
Fixes sysrepo/sysrepo#2822
diff --git a/src/plugins_exts/nacm.c b/src/plugins_exts/nacm.c
index aa0d0e8..1a50ea3 100644
--- a/src/plugins_exts/nacm.c
+++ b/src/plugins_exts/nacm.c
@@ -120,7 +120,8 @@
/* check for duplication */
LY_ARRAY_FOR(parent->exts, u) {
- if ((&parent->exts[u] != c_ext) && (parent->exts[u].def->plugin->compile == c_ext->def->plugin->compile)) {
+ if ((&parent->exts[u] != c_ext) && parent->exts[u].def->plugin &&
+ (parent->exts[u].def->plugin->compile == c_ext->def->plugin->compile)) {
/* duplication of a NACM extension on a single node
* We check for all NACM plugins since we want to catch even the situation that there is default-deny-all
* AND default-deny-write */