summaryrefslogtreecommitdiff
path: root/src/plugins/python/weechat-python.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-03-07 09:35:29 +0100
committerSébastien Helleu <flashcode@flashtux.org>2015-03-07 09:35:29 +0100
commite95f8533031771d8307c6ed54d0fe2cf0bc8da37 (patch)
treedc6b35d7f2521520a81b08578829d1d7bdea3794 /src/plugins/python/weechat-python.c
parent5d1f7e79ba3d777f238a77bd953713a3c1cc3bd2 (diff)
downloadweechat-e95f8533031771d8307c6ed54d0fe2cf0bc8da37.zip
scripts: reset current script pointer when load of script fails in python/perl/ruby/lua/tcl plugins
Diffstat (limited to 'src/plugins/python/weechat-python.c')
-rw-r--r--src/plugins/python/weechat-python.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c
index 9f0b0019b..7a3731b26 100644
--- a/src/plugins/python/weechat-python.c
+++ b/src/plugins/python/weechat-python.c
@@ -722,11 +722,12 @@ weechat_python_load (const char *filename)
PyErr_Print ();
/* if script was registered, remove it from list */
- if (python_current_script != NULL)
+ if (python_current_script)
{
plugin_script_remove (weechat_python_plugin,
&python_scripts, &last_python_script,
python_current_script);
+ python_current_script = NULL;
}
Py_EndInterpreter (python_current_interpreter);