1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 12:56:37 +02:00

Fix crash in Perl plugin when callbacks are called during script initialization (bug #29018)

This commit is contained in:
Sebastien Helleu
2010-02-27 09:58:24 +01:00
parent 62aff3f1c6
commit 282f786c1a
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -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);