summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-08-04 22:56:02 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-08-04 22:56:02 +0200
commit6704825d7b0ac64290d790f14346b5ae93f593cd (patch)
tree7a8c6beb0f24bd60a95bb294473189a3b091d668
parentec898732a17e9652181d7059489e85f4fd89a34c (diff)
downloadweechat-6704825d7b0ac64290d790f14346b5ae93f593cd.zip
core: check that line_data is not NULL in functions gui_line_tags_alloc and gui_line_has_tag_no_filter
-rw-r--r--src/gui/gui-line.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c
index cbf1aa375..a0b3fcedd 100644
--- a/src/gui/gui-line.c
+++ b/src/gui/gui-line.c
@@ -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)