core: check that line is not NULL in functions gui_line_is_displayed and gui_line_get_nick_tag
This commit is contained in:
parent
6704825d7b
commit
0ab44c02a4
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user