[kernel] add assert to module object

This commit is contained in:
liang yongxiang 2018-07-11 18:31:01 +08:00
parent 9945ced57b
commit d645525a0b
1 changed files with 1 additions and 0 deletions

View File

@ -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));