diff options
| author | liang yongxiang <[email protected]> | 2018-07-11 18:31:01 +0800 |
|---|---|---|
| committer | liang yongxiang <[email protected]> | 2018-07-11 18:31:01 +0800 |
| commit | d645525a0b7a6e2f1113910a7a6c2fefd6cd388f (patch) | |
| tree | 54fd54a9e4edde291e50163c0288dfdbec132f24 /src | |
| parent | 9945ced57bae7b94de70e24c7b3bd36aeda5e560 (diff) | |
[kernel] add assert to module object
Diffstat (limited to 'src')
| -rw-r--r-- | src/module.c | 1 |
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)); |
