1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 09:13:14 +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
+2 -1
View File
@@ -595,11 +595,12 @@ weechat_ruby_load (const char *filename)
err = rb_gv_get("$!");
weechat_ruby_print_exception(err);
if (ruby_current_script != NULL)
if (ruby_current_script)
{
plugin_script_remove (weechat_ruby_plugin,
&ruby_scripts, &last_ruby_script,
ruby_current_script);
ruby_current_script = NULL;
}
return 0;