mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 21:36:37 +02:00
core: check that line is not NULL in functions gui_line_is_displayed and gui_line_get_nick_tag
This commit is contained in:
@@ -383,6 +383,9 @@ gui_line_get_align (struct t_gui_buffer *buffer, struct t_gui_line *line,
|
||||
int
|
||||
gui_line_is_displayed (struct t_gui_line *line)
|
||||
{
|
||||
if (!line)
|
||||
return 0;
|
||||
|
||||
/* line is hidden if filters are enabled and flag "displayed" is not set */
|
||||
if (gui_filters_enabled && !line->data->displayed)
|
||||
return 0;
|
||||
@@ -733,6 +736,9 @@ gui_line_get_nick_tag (struct t_gui_line *line)
|
||||
{
|
||||
const char *tag;
|
||||
|
||||
if (!line)
|
||||
return NULL;
|
||||
|
||||
tag = gui_line_search_tag_starting_with (line, "nick_");
|
||||
if (!tag)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user