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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user