diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-02-27 09:58:24 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-02-27 09:58:24 +0100 |
commit | 282f786c1a75978ea0ad4399b7740abd6ff6486a (patch) | |
tree | 60902c245e7dc8e0c9cfbe38fbb33edd2e52d0de /src/plugins/scripts/perl | |
parent | 62aff3f1c6ccec7dc2ae0bc92bbd185666532287 (diff) | |
download | weechat-282f786c1a75978ea0ad4399b7740abd6ff6486a.zip |
Fix crash in Perl plugin when callbacks are called during script initialization (bug #29018)
Diffstat (limited to 'src/plugins/scripts/perl')
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c index 50ee2845b..15a741545 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/weechat-perl.c @@ -148,7 +148,8 @@ weechat_perl_exec (struct t_plugin_script *script, (void) length; func = (char *) function; old_context = PERL_GET_CONTEXT; - PERL_SET_CONTEXT (script->interpreter); + if (script->interpreter) + PERL_SET_CONTEXT (script->interpreter); #else length = strlen (script->interpreter) + strlen (function) + 3; func = (char *) malloc (length); |