mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 12:26:40 +02:00
api: remove script hooks before buffers/bar items/configs
This prevents a crash in some scripts that could use options after they are
freed, with the call to hook config callback that has been enabled by commit
2260214797.
This commit is contained in:
@@ -1054,15 +1054,15 @@ plugin_script_remove (struct t_weechat_plugin *weechat_plugin,
|
||||
{
|
||||
script->unloading = 1;
|
||||
|
||||
/* remove all hooks created by this script */
|
||||
weechat_unhook_all (script->name);
|
||||
|
||||
plugin_script_close_buffers (weechat_plugin, script);
|
||||
|
||||
plugin_script_remove_bar_items (weechat_plugin, script);
|
||||
|
||||
plugin_script_remove_configs (weechat_plugin, script);
|
||||
|
||||
/* remove all hooks created by this script */
|
||||
weechat_unhook_all (script->name);
|
||||
|
||||
/* remove script from list */
|
||||
if (script->prev_script)
|
||||
(script->prev_script)->next_script = script->next_script;
|
||||
|
||||
Reference in New Issue
Block a user