aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rtlil.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index dc368ead5..6996a02c4 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -597,6 +597,7 @@ void RTLIL::Design::remove(RTLIL::Module *module)
}
log_assert(modules_.at(module->name) == module);
+ log_assert(refcount_modules_ == 0);
modules_.erase(module->name);
delete module;
}