1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: set prefix to NULL when clearing a line on a buffer with free content

This commit is contained in:
Sébastien Helleu
2022-01-26 20:23:16 +01:00
parent 0ebf3dbede
commit 3983f01ee7
+3 -2
View File
@@ -1788,9 +1788,10 @@ void
gui_line_clear (struct t_gui_line *line)
{
if (line->data->prefix)
{
string_shared_free (line->data->prefix);
line->data->prefix = (char *)string_shared_get ("");
line->data->prefix = NULL;
}
if (line->data->message)
free (line->data->message);
line->data->message = strdup ("");