1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

fix crash on /quit when unloading modules

this fixes a crash on /quit when the module unloaded is trying
to reference symbols from already-unloaded modules, by reversing
the lists.
This commit is contained in:
ailin 2020-04-02 15:39:40 +02:00
parent b69074bb39
commit ae89ba7164

View File

@ -214,7 +214,7 @@ MODULE_FILE_REC *module_register_full(const char *name, const char *submodule,
module = g_new0(MODULE_REC, 1);
module->name = g_strdup(name);
modules = g_slist_append(modules, module);
modules = g_slist_prepend(modules, module);
}
file = module_file_find(module, submodule);
@ -226,7 +226,7 @@ MODULE_FILE_REC *module_register_full(const char *name, const char *submodule,
file->name = g_strdup(submodule);
file->defined_module_name = g_strdup(defined_module_name);
module->files = g_slist_append(module->files, file);
module->files = g_slist_prepend(module->files, file);
return file;
}