1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

message: fix potential segfault in _receipt_request_handler

This commit is contained in:
Michael Vetter 2021-03-25 11:56:38 +01:00
parent e396e863dd
commit d2dc440535

View File

@ -1176,9 +1176,13 @@ _receipt_request_handler(xmpp_stanza_t* const stanza)
}
const gchar* from = xmpp_stanza_get_from(stanza);
Jid* jid = jid_create(from);
_message_send_receipt(jid->fulljid, id);
jid_destroy(jid);
if (from) {
Jid* jid = jid_create(from);
if (jid) {
_message_send_receipt(jid->fulljid, id);
jid_destroy(jid);
}
}
}
static void