diff options
-rw-r--r-- | src/xmpp/message.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c index b1c22513..f638bd2e 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -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); } |