summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-06-10 22:32:11 +0200
committerSebastien Helleu <flashcode@flashtux.org>2012-06-10 22:32:11 +0200
commite25909878e54882515cd926c0a2fbb31df18ffe8 (patch)
treed359b48368fba770d5180a322b3cbe4b46d0bef2 /src
parent58918e2eeb6cbb1ac91ed2609a09f6581dd0f646 (diff)
downloadweechat-e25909878e54882515cd926c0a2fbb31df18ffe8.zip
lua: fix crash when unloading a script without pointer to interpreter
Diffstat (limited to 'src')
-rw-r--r--src/plugins/scripts/lua/weechat-lua.c3
1 files changed, 2 insertions, 1 deletions
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);
}
/*