0
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-07-26 12:14:28 -04: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); const gchar* from = xmpp_stanza_get_from(stanza);
if (from) {
Jid* jid = jid_create(from); Jid* jid = jid_create(from);
if (jid) {
_message_send_receipt(jid->fulljid, id); _message_send_receipt(jid->fulljid, id);
jid_destroy(jid); jid_destroy(jid);
}
}
} }
static void static void