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

Merge pull request #1167 from ailin-nemui/quit-crash

fix crash on /quit when unloading modules
This commit is contained in:
ailin-nemui 2020-04-03 23:26:54 +02:00 committed by GitHub
commit 8b7bf1f04e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 = g_new0(MODULE_REC, 1);
module->name = g_strdup(name); module->name = g_strdup(name);
modules = g_slist_append(modules, module); modules = g_slist_prepend(modules, module);
} }
file = module_file_find(module, submodule); 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->name = g_strdup(submodule);
file->defined_module_name = g_strdup(defined_module_name); 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; return file;
} }