From 265a0cf2a1dc625dd412c724262be07e31214b37 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 29 Nov 2008 23:31:28 +0100 Subject: Fix bugs with hook_print function in scripts --- src/plugins/scripts/python/weechat-python-api.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/scripts/python') diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c index f6253f087..06459fb84 100644 --- a/src/plugins/scripts/python/weechat-python-api.c +++ b/src/plugins/scripts/python/weechat-python-api.c @@ -2522,6 +2522,8 @@ weechat_python_api_hook_print_cb (void *data, struct t_gui_buffer *buffer, python_argv[0] = script_ptr2str (buffer); python_argv[1] = timebuffer; python_argv[2] = weechat_string_build_with_exploded (tags, ","); + if (!python_argv[2]) + python_argv[2] = strdup (""); python_argv[3] = (displayed) ? strdup ("1") : strdup ("0"); python_argv[4] = (highlight) ? strdup ("1") : strdup ("0"); python_argv[5] = (char *)prefix; -- cgit v1.2.3