1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

message: make _handle_error safer

This commit is contained in:
Michael Vetter 2021-03-25 16:50:10 +01:00
parent 3a6bce5a09
commit 8df5e99981

View File

@ -864,8 +864,10 @@ _handle_error(xmpp_stanza_t* const stanza)
} else {
if (type && (strcmp(type, "cancel") == 0)) {
Jid* jidp = jid_create(jid);
chat_session_remove(jidp->barejid);
jid_destroy(jidp);
if (jidp) {
chat_session_remove(jidp->barejid);
jid_destroy(jidp);
}
}
ui_handle_recipient_error(jid, err_msg);
}