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,10 +1176,14 @@ _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
_handle_muc_private_message(xmpp_stanza_t* const stanza) _handle_muc_private_message(xmpp_stanza_t* const stanza)