🐞 fix(fix module_get_by_name bug): continue find when mod null
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user