From 8d2b1b05e7f5d1ea5320dded432824e4cf86ebaf Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 1 Nov 2019 18:31:19 +0100 Subject: [PATCH] Initialize ProfBufEntry->id correctly --- src/ui/buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui/buffer.c b/src/ui/buffer.c index b36f19e7..f24f1d8f 100644 --- a/src/ui/buffer.c +++ b/src/ui/buffer.c @@ -91,7 +91,11 @@ buffer_append(ProfBuff buffer, const char show_char, int pad_indent, GDateTime * e->from = from ? strdup(from) : NULL; e->message = strdup(message); e->receipt = receipt; - e->id = strdup(id); + if (id) { + e->id = strdup(id); + } else { + e->id = NULL; + } if (g_slist_length(buffer->entries) == BUFF_SIZE) { _free_entry(buffer->entries->data);