diff options
author | Paul Fariello <paul@fariello.eu> | 2019-06-21 13:02:11 +0200 |
---|---|---|
committer | Paul Fariello <paul@fariello.eu> | 2019-06-21 12:03:08 +0200 |
commit | ac96a6951d04a7de0ffc8bf3c177b34037925f2c (patch) | |
tree | a934532ba74f3f02d6eaf3418eb97f0975d110f3 /src | |
parent | 4b62f8f2ba512174ea789006eaa1a425ad37974e (diff) | |
download | profani-tty-ac96a6951d04a7de0ffc8bf3c177b34037925f2c.tar.gz |
Fix segfault when receiving messages without ID
Diffstat (limited to 'src')
-rw-r--r-- | src/xmpp/message.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 3d4807fe..4f088b8e 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -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); |