1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -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(); ProfMessage *message = message_init();
message->jid = jid; message->jid = jid;
if (id) {
message->id = strdup(id); message->id = strdup(id);
}
message->body = xmpp_message_get_body(stanza); message->body = xmpp_message_get_body(stanza);