mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 12:26:40 +02:00
Fix bug with current script pointer when current script is unloaded
This commit is contained in:
@@ -294,6 +294,10 @@ weechat_lua_unload (struct t_plugin_script *script)
|
||||
|
||||
interpreter = script->interpreter;
|
||||
|
||||
if (lua_current_script == script)
|
||||
lua_current_script = (lua_current_script->prev_script) ?
|
||||
lua_current_script->prev_script : lua_current_script->next_script;
|
||||
|
||||
script_remove (weechat_lua_plugin, &lua_scripts, script);
|
||||
|
||||
lua_close (script->interpreter);
|
||||
|
||||
Reference in New Issue
Block a user