1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Fix segfault when receiving messages without ID

This commit is contained in:
Paul Fariello 2019-06-21 13:02:11 +02:00
parent 4b62f8f2ba
commit ac96a6951d

View File

@ -798,7 +798,9 @@ _handle_groupchat(xmpp_stanza_t *const stanza)
ProfMessage *message = message_init();
message->jid = jid;
message->id = strdup(id);
if (id) {
message->id = strdup(id);
}
message->body = xmpp_message_get_body(stanza);