plugins types UPDATE safety assert
#include "plugins_types.h"
+#include <assert.h>
#include <ctype.h>
#include <inttypes.h>
#include <stdio.h>
@@ -850,6 +851,8 @@ lyplg_type_identity_isderived(const struct lysc_ident *base, const struct lysc_i
{
LY_ARRAY_COUNT_TYPE u;
+ assert(base->module->ctx == der->module->ctx);
+
LY_ARRAY_FOR(base->derived, u) {
if (der == base->derived[u]) {
return LY_SUCCESS;
