diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-04-30 13:21:21 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-04-30 13:21:21 +0200 |
commit | 886b81498f2b0e738c16ec55d4675f3c8555117d (patch) | |
tree | 5faa27240b105ce0c0f67c4a40fc1ee17fc40cfe /src/plugins/scripts/python/weechat-python-api.c | |
parent | 760e216c5b3cc7945bfb17f94e39900d20c185e7 (diff) | |
download | weechat-886b81498f2b0e738c16ec55d4675f3c8555117d.zip |
Fixed crash with scripts when WeeChat calls functions of many scripts at same time with callbacks (bug #23109)
Diffstat (limited to 'src/plugins/scripts/python/weechat-python-api.c')
-rw-r--r-- | src/plugins/scripts/python/weechat-python-api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c index 87a7c53c4..9a7696c24 100644 --- a/src/plugins/scripts/python/weechat-python-api.c +++ b/src/plugins/scripts/python/weechat-python-api.c @@ -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) { |