提交 d645525a 编写于 作者: L liang yongxiang

[kernel] add assert to module object

上级 9945ced5
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册