1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Initialize ProfBufEntry->id correctly

This commit is contained in:
Michael Vetter 2019-11-01 18:31:19 +01:00
parent bc282ef569
commit 8d2b1b05e7

View File

@ -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);