mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04: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:
parent
b69074bb39
commit
ae89ba7164
@ -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,8 +226,8 @@ 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);
|
||||
return file;
|
||||
module->files = g_slist_prepend(module->files, file);
|
||||
return file;
|
||||
}
|
||||
|
||||
MODULE_REC *module_find(const char *name)
|
||||
|
Loading…
Reference in New Issue
Block a user