mirror of
https://github.com/weechat/weechat.git
synced 2026-07-01 23:36:37 +02:00
core: check that line_data is not NULL in functions gui_line_tags_alloc and gui_line_has_tag_no_filter
This commit is contained in:
@@ -96,6 +96,9 @@ gui_line_lines_free (struct t_gui_lines *lines)
|
||||
void
|
||||
gui_line_tags_alloc (struct t_gui_line_data *line_data, const char *tags)
|
||||
{
|
||||
if (!line_data)
|
||||
return;
|
||||
|
||||
if (tags)
|
||||
{
|
||||
line_data->tags_array = string_split_shared (tags, ",", NULL, 0, 0,
|
||||
@@ -620,6 +623,9 @@ gui_line_has_tag_no_filter (struct t_gui_line_data *line_data)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!line_data)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < line_data->tags_count; i++)
|
||||
{
|
||||
if (strcmp (line_data->tags_array[i], GUI_FILTER_TAG_NO_FILTER) == 0)
|
||||
|
||||
Reference in New Issue
Block a user