summaryrefslogtreecommitdiff
path: root/src/module.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-07-11 21:38:31 +0800
committerGitHub <[email protected]>2018-07-11 21:38:31 +0800
commit44712ba2cfd113374986f7a63d7c48ec34c4a8da (patch)
tree7b3b9c3ad9954bce86ae2fc80d5edc7498808185 /src/module.c
parent5719a3db3aa1c151df8de35fdf9aff131582da94 (diff)
parentd645525a0b7a6e2f1113910a7a6c2fefd6cd388f (diff)
Merge pull request #1611 from TanekLiang/add-more-assert
add more assert for object check
Diffstat (limited to 'src/module.c')
-rw-r--r--src/module.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c
index 843b3364a9..89ab7735bd 100644
--- a/src/module.c
+++ b/src/module.c
@@ -1182,6 +1182,7 @@ rt_err_t rt_module_destroy(rt_module_t module)
/* check parameter */
RT_ASSERT(module != RT_NULL);
RT_ASSERT(module->nref == 0);
+ RT_ASSERT(rt_object_get_type(&module->parent) == RT_Object_Class_Module);
RT_DEBUG_LOG(RT_DEBUG_MODULE, ("rt_module_destroy: %8.*s\n",
RT_NAME_MAX, module->parent.name));