From 77058acc0aefe848aa9d71fd6843ae684e989f0d Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Mon, 17 Feb 2014 21:57:51 +0100 Subject: perl: fix context used after unload of a script --- src/plugins/perl/weechat-perl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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); -- cgit v1.2.3