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

core: fix malloc(0) when building content of a bar using a filling with columns

This commit is contained in:
Sebastien Helleu
2013-07-13 07:31:51 +02:00
parent 4668f0bef5
commit c6fe4b18ef
+2 -1
View File
@@ -838,7 +838,8 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
/* build array with pointers to split items */
linear_items = malloc (total_items * sizeof (*linear_items));
linear_items = (total_items > 0) ?
malloc (total_items * sizeof (*linear_items)) : NULL;
if (linear_items)
{
index = 0;