mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
fix segfault on self sent message carbon
This commit is contained in:
parent
89f472512f
commit
3eeafa2277
@ -434,6 +434,11 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
|||||||
gchar *to = xmpp_stanza_get_attribute(message, STANZA_ATTR_TO);
|
gchar *to = xmpp_stanza_get_attribute(message, STANZA_ATTR_TO);
|
||||||
gchar *from = xmpp_stanza_get_attribute(message, STANZA_ATTR_FROM);
|
gchar *from = xmpp_stanza_get_attribute(message, STANZA_ATTR_FROM);
|
||||||
|
|
||||||
|
// happens when receive a carbon of a self sent message
|
||||||
|
if(to == NULL) {
|
||||||
|
to = from;
|
||||||
|
}
|
||||||
|
|
||||||
Jid *jid_from = jid_create(from);
|
Jid *jid_from = jid_create(from);
|
||||||
Jid *jid_to = jid_create(to);
|
Jid *jid_to = jid_create(to);
|
||||||
Jid *my_jid = jid_create(jabber_get_fulljid());
|
Jid *my_jid = jid_create(jabber_get_fulljid());
|
||||||
|
Loading…
Reference in New Issue
Block a user