From e25909878e54882515cd926c0a2fbb31df18ffe8 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 10 Jun 2012 22:32:11 +0200 Subject: [PATCH] lua: fix crash when unloading a script without pointer to interpreter --- ChangeLog | 1 + src/plugins/scripts/lua/weechat-lua.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fa46e9600..cbdc95c9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ Version 0.3.9 (under dev!) * guile: fix path of guile include dirs in cmake build (patch #7790) * irc: fix freeze when reading on socket with SSL enabled (bug #35097) * irc: reallow names beginning with "#" for servers +* lua: fix crash when unloading a script without pointer to interpreter * python: fix crash when unloading a script without pointer to interpreter Version 0.3.8 (2012-06-03) diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c index a6f36a5e3..2b364d38e 100644 --- a/src/plugins/scripts/lua/weechat-lua.c +++ b/src/plugins/scripts/lua/weechat-lua.c @@ -410,7 +410,8 @@ weechat_lua_unload (struct t_plugin_script *script) script_remove (weechat_lua_plugin, &lua_scripts, &last_lua_script, script); - lua_close (interpreter); + if (interpreter) + lua_close (interpreter); } /*