summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-17 21:57:51 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-17 21:57:51 +0100
commit77058acc0aefe848aa9d71fd6843ae684e989f0d (patch)
tree44e1709f6b493753437c55f34bbd0948f24d73e1 /src/plugins
parent5ac3d538b8cfe89413f309fcbf6d4ea88e4c18d5 (diff)
downloadweechat-77058acc0aefe848aa9d71fd6843ae684e989f0d.zip
perl: fix context used after unload of a script
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/perl/weechat-perl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c
index ce3f5968e..e4fad167b 100644
--- a/src/plugins/perl/weechat-perl.c
+++ b/src/plugins/perl/weechat-perl.c
@@ -538,6 +538,10 @@ weechat_perl_unload (struct t_plugin_script *script)
perl_destruct (interpreter);
perl_free (interpreter);
}
+ if (perl_current_script)
+ {
+ PERL_SET_CONTEXT (perl_current_script->interpreter);
+ }
#else
if (interpreter)
free (interpreter);