summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-17 22:00:16 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-17 22:00:16 +0100
commitbe159f42a847d3d21d0bd716c25f035f9b36b736 (patch)
treed6a9b51a5fe9354b8799886a9911330b33b1da01
parent77058acc0aefe848aa9d71fd6843ae684e989f0d (diff)
downloadweechat-be159f42a847d3d21d0bd716c25f035f9b36b736.zip
lua: fix interpreter used after unload of a script
-rw-r--r--ChangeLog1
-rw-r--r--src/plugins/lua/weechat-lua.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c1e52fa31..9c4e57443 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* core: display a warning in case of inconsistency between the options
weechat.look.save_{config|layout}_on_exit
* api: add integer return code for functions hook_{signal|hsignal}_send
+* lua: fix interpreter used after unload of a script
* perl: fix context used after unload of a script
* python: fix interpreter used after unload of a script
diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c
index dfbf756b8..8a6acea57 100644
--- a/src/plugins/lua/weechat-lua.c
+++ b/src/plugins/lua/weechat-lua.c
@@ -515,6 +515,9 @@ weechat_lua_unload (struct t_plugin_script *script)
if (interpreter)
lua_close (interpreter);
+ if (lua_current_script)
+ lua_current_interpreter = lua_current_script->interpreter;
+
(void) weechat_hook_signal_send ("lua_script_unloaded",
WEECHAT_HOOK_SIGNAL_STRING, filename);
if (filename)