1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-22 02:46:38 +02:00

Fixed crash with scripts when WeeChat calls functions of many scripts at same time with callbacks (bug #23109)

This commit is contained in:
Sebastien Helleu
2008-04-30 13:21:21 +02:00
parent 760e216c5b
commit 886b81498f
13 changed files with 234 additions and 34 deletions
@@ -2341,7 +2341,7 @@ weechat_python_api_hook_signal_cb (void *data, char *signal, char *type_data,
{
struct t_script_callback *script_callback;
char *python_argv[3];
static char value_str[64];
static char value_str[64], empty_value[1] = { '\0' };
int *rc, ret, free_needed;
script_callback = (struct t_script_callback *)data;
@@ -2350,7 +2350,7 @@ weechat_python_api_hook_signal_cb (void *data, char *signal, char *type_data,
free_needed = 0;
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
{
python_argv[1] = (char *)signal_data;
python_argv[1] = (signal_data) ? (char *)signal_data : empty_value;
}
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_INT) == 0)
{