From 6704825d7b0ac64290d790f14346b5ae93f593cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 4 Aug 2020 22:56:02 +0200 Subject: core: check that line_data is not NULL in functions gui_line_tags_alloc and gui_line_has_tag_no_filter --- src/gui/gui-line.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- cgit v1.2.3