🐞 fix(fix module_get_by_name bug): continue find when mod null

This commit is contained in:
yangwei
2024-11-27 19:37:03 +08:00
parent 10dc717b07
commit 3202b9ae31
4 changed files with 47 additions and 47 deletions

View File

@@ -226,7 +226,7 @@ struct module *module_manager_get_module(struct module_manager *mod_mgr, const c
{
for(int i=0; i<mod_mgr->n_descriptor; i++)
{
if(mod_mgr->descriptors[i].mod == NULL)break;
if(mod_mgr->descriptors[i].mod == NULL)continue;
if(strcmp(mod_mgr->descriptors[i].mod->name, module_name)==0 && mod_mgr->descriptors[i].initialized)
{
return mod_mgr->descriptors[i].mod;