1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 18:23:13 +02:00

scripts: reset current script pointer when load of script fails in python/perl/ruby/lua/tcl plugins

This commit is contained in:
Sébastien Helleu
2015-03-07 09:35:29 +01:00
parent 5d1f7e79ba
commit e95f853303
6 changed files with 21 additions and 5 deletions
+11 -2
View File
@@ -339,8 +339,17 @@ weechat_tcl_load (const char *filename)
"parsing file \"%s\": %s"),
weechat_prefix ("error"), TCL_PLUGIN_NAME, filename,
Tcl_GetStringFromObj (Tcl_GetObjResult (interp), &i));
/* this OK, maybe "register" was called, so not return */
/* return 0; */
/* if script was registered, remove it from list */
if (tcl_current_script)
{
plugin_script_remove (weechat_tcl_plugin,
&tcl_scripts, &last_tcl_script,
tcl_current_script);
tcl_current_script = NULL;
}
return 0;
}
if (!tcl_registered_script)